How do you stretch an image to fill a while keeping the image’s aspect-ratio?

I need to make this image stretch to the maximum size possible without overflowing it’s <div> or skewing the image. I can’t predict the aspect-ratio of the image, so there’s no way to know whether to use: <img src=”https://stackoverflow.com/questions/1891857/url” style=”width: 100%;”> or <img src=”https://stackoverflow.com/questions/1891857/url” style=”height: 100%;”> I can’t use both (i.e. style=”width: 100%; height: 100%;”) … Read more

How can I convert a series of images to a PDF from the command line on linux? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 10 years ago. Improve this question I have a scanning server I wrote in cgi/bash and want to be able to convert a bunch of images (all in one … Read more

Check if an image is loaded (no errors) with jQuery

I’m using JavaScript with the jQuery library to manipulate image thumbnails contained in a unordered list. When the image is loaded it does one thing, when an error occurs it does something else. I’m using jQuery load() and error() methods as events. After these events I check the image DOM element for the .complete to … Read more

Drop shadow for PNG image in CSS

I have a PNG image, that has free form (non square). I need to apply drop-shadow effect to this image. The standard approach … -o-box-shadow: 12px 12px 29px #555; -icab-box-shadow: 12px 12px 29px #555; -khtml-box-shadow: 12px 12px 29px #555; -moz-box-shadow: 12px 12px 29px #555; -webkit-box-shadow: 12px 12px 29px #555; box-shadow: 12px 12px 29px #555; … … Read more

How do I force Kubernetes to re-pull an image?

I have the following replication controller in Kubernetes on GKE: apiVersion: v1 kind: ReplicationController metadata: name: myapp labels: app: myapp spec: replicas: 2 selector: app: myapp deployment: initial template: metadata: labels: app: myapp deployment: initial spec: containers: – name: myapp image: myregistry.com/myapp:5c3dda6b ports: – containerPort: 80 imagePullPolicy: Always imagePullSecrets: – name: myregistry.com-registry-key Now, if I … Read more

How to get the width and height of an android.widget.ImageView?

╔══════════════════════════════════════════════╗ ^ ║ ImageView ╔══════════════╗ ║ | ║ ║ ║ ║ | ║ ║ Actual image ║ ║ | ║ ║ ║ ║ |60px height of ImageView ║ ║ ║ ║ | ║ ║ ║ ║ | ║ ╚══════════════╝ ║ | ╚══════════════════════════════════════════════╝ <————————————————> 90px width of ImageView I have an image view with some default … Read more