ImageResizer rotates images - asp.net-mvc

I use ImageResizer in my web application. It resizes most of the images on the page correctly. But there is one set of images, that it rotates. The code is the same for all the images.
See the following link, if you remove the querystring for ?width=500, then the image is right, but the width, resizes the image and rotates it for some reason
Please any help would be appreciated.

Cameras do not rotate images according to the orientation sensor; they just set a flag in the metadata.
Install the AutoRotate plugin and put &autorotate=true in the querystring. This will cause the image to be rotated according to the metadata prior to any rotate commands.

When I downloaded the images they were upside down, I fixed this paint.net, re-uploaded, now they are fine. The funny thing is when viewing the image in browser without the querystring they were fine.Wierd...

Related

Image Rotates and zooms while editing

I am using a library called SnapSliderFilters to apply filters to an image. I need the filters to be applied exactly the way it is presented in the library's example.
When I implemented the code exactly as directed on an image captured with a custom camera, sliding sideways, while applying the image filter, it also causes the image to rotate by 90 degrees and the image to zoom.
In other case, when I select an image from gallery, that is of exact dimension as the screen, it works perfectly fine.
So, I think I have found the cause to be image size but I don't know where to begin.
Here is how it displays:

iOS wrong orientation when using front camera on UIImagePickerController

I'm using UIImagePickerController to snap an image and uploading it to server.
When taking a photo in the front camera, the height/width get reversed somewhere.
The image is displayed correctly later, but height and width are reversed (and I'm using them for the UIImageView autolayout constraint)
The thing is - that when looking at UIImagePickerControllerMediaMetadata of front and back camera images - the EXIF and the rest of the metadata is the same (resolution is smaller but the height/width ratio is the same)
Any ideas what is the difference?
Apple images are always landscape left with EXIF and the orientation is specified in the EXIF.
OK, so #zaph comment is correct, apparently back camera images are "reversed" as well - the upload code in the server (Codeigniter PHP) ignored the EXIF.
The problem surfaced only due to front camera low resolution...

UIImage being stretched when copying from UIPasteboard

I have a valid image with the right content size, however I have noticed when I try to paste this image to WhatsApp or through iMessage the image get's significantly stretched. I have looked at the image and it seams to be fine on UIImageview, but somehow it gets stretched in particular to outer controls.
Is there anyway to fix this issue?
When copying an image make sure to modify the imageView's mode. There are different modes, like Aspect Fit, Scale to fill and so on.
If let's say the image is 500x300 and your imageView's size is set to 350x230 and mode to Scale to fill, it will end up stretched. Try to fiddle around and see what works for you. Most of the times i choose Aspect Fit.
Try that out.
BTW. You can find it under inspection tab in design editor or set it programmatically if you choose so.

Problems with iOS 6 Canvas iPhone Image Upload

i've got a problem by uploading an image into the HTML 5 Canvas Object.
When i was uploading the images with my computer it works fine and i have no problems. but when any image is uploaded from the iPhone-Camera, the origin height is getting distorted.
how can i fix this bug?
does any one know, how to fix this, working together with fabric.js ? because i'm not drawing the images into the canvas 2d context but in the layers of the fabric.js. this is important to get the full interactivity with all items, drawn on canvas.
i hope anyone could help me.
thanks in advance
P.S
Don't know if this answer is related to yours but it might get you in the right direction:
Mobile Safari renders <img src="data:image/jpeg;base64..."> scaled on Canvas?

blurred #2x images and ios web service data

Why do #2x images get blurry when they have web service data over them?
Web service data looks pixelated too.
Thanks a lot!
You mean, that you are retrieving the image from a webservice? If so, it has nothing to see with a name convention. Images retrieved from a WS must be resized to a proper size. Or just add a parameter to your WS where you can select the size for your image.
The #2x parameter only work for bundled images. If you are downloading them, that won't work.
in your image view try to do not use "Scale to fill" nor "Aspect Fill/Fit" to check if these external images come in correct resolution. If they look smaller than they should - they get blurred on upscaling. Try to provide better res images and use Aspect Fill/Fit (depending on your needs), they'll get downscaled well in pre-retina displays.

Resources