What's wrong with the image? - image

I got a image: http://images.tyler.lu/iphone-4s-a.jpg
http://images.tyler.lu/iphone-4s-a.jpg
It looks different in different browsers.
Chrome
IE
What's wrong with the image?

Below is Thilo's answer:
There is a EXIF attribute "Orientation" in the file, set to "3 (rotated 180 degrees)".
Same problem in a .NET image processor: Problem reading JPEG Metadata (Orientation)
Browser support for EXIF orientation is complicated:https://code.google.com/p/chromium/issues/detail?id=56845
And I also found a post about the EXIF "Orientation": Exif Orientation Tag
Thanks Thilo!

Related

Dicom image not converting with dcmtk

The image http://www.barre.nom.fr/medical/samples/files/MR-MONO2-16-head.gz on http://www.barre.nom.fr/medical/samples/is not converting to other image formats. I tried following commands (after extracting the dicom file):
dcm2pnm --write-png MR-MONO2-16-head out.png
dcm2pnm +obr MR-MONO2-16-head out.bmp
dcm2pnm MR-MONO2-16-head out.pnm
It also did not work with dcmj2pnm and dcml2pnm. All of them just produce a gray box. The image otherwise is OK and is correctly read by proper dicom viewer softwares. Where is the problem and how can it be solved?
The problem is that no windowing settings are present in the header. You need to instruct dcm2pnm to calculate a window from the histogram (+Wm) or specify windowing values to apply.
dcm2pnm +Wm +obr MR-MONO2-16-head MR-MONO2-16-head.bmp
yields a bitmap image that looks fine to me.

Many of the time getting "result_code" as "BadImage" when uploading image of 24bit RGB PNG image to vuforia

Many of the time getting "result_code" as "BadImage" when uploading image of 24bit RGB PNG image to vuforia. If i am converting same image to JPEG then its getting uploaded properly. So not able to understand whats issue with image.(All the JPEG images are getting uploaded properly. only issue with many of PNG images.)
I had done some RnD
“BadImage” Unprocessable Entity (422) Image corrupted or format not supported (target POST/PUT response)
but not able to identify the issue.
Any help would be appreciated.
Thanks.

How can I make firefox render PNG with correct colors?

Firefox 12 renders the image below in paler colors while Chrome 19, Opera 11, Safari 5 and IE9 render it correctly.
The image on the left is original PNG uploaded to Stackoverflow while the one on the right is screenshot snippet of Firefox's rendering:
When you view this question page on Firefox you still see a difference. I believe Firefox applies the same color transformation to it's own rendering (saved by snip tool) too. But I don't see any rendering difference on stackoverflow logo.
I tried with both Paint.NET's saved PNG and output of OptiPNG, results are the same. Any troubleshooting hints are also appreciated.
The png image has a gAMA chunk, so its rendering will depend on whether the thing doing the rendering supports gamma correction for PNGs.
Firefox does support this. Other browsers may not.
Funny enough, in 2016 the exact opposite is now true. In the absence of an ICC profile, Firefox needs the sRGB chunk to render PNGs the same as Safari/Chrome/WebKit.
You can use free/open-source pngcrush to add an sRGB chunk to your image if it doesn't have one.
pngcrush -sRGB existing.png new-better.png
NB - Firefox 45.0.2 for OS X, PNG generated by Adobe Illustrator CC 2015, your mileage may vary...
When using iMagick in PHP to create png image, the same situation might occur. At the current moment both Firefox and Chrome renders image with different color than IE11.
You can remove the gamma information using this PHP code just before saving:
$imagick->stripImage();

Codeigniter strip image EXIF data

I am doing image upload and resizing using the gd2 image library.
The image EXIF data is rotating my vertical pictures on resize. Is there a way to stop the image from rotating? or strip the exif data in php?
Barring learning the JPEG format and figuring out how to remove EXIF bit by bit...
You can use the GD library.
http://www.php.net/manual/en/function.imagecreatefromjpeg.php and http://www.php.net/manual/en/function.imagejpeg.php should do it.

JPEG Shows in Firefox but Not IE8

I'm working on a Sidebar Gadget and cannot get my JPEGs to show up (PNGs work). When I try to open the file by itself in IE8 it doesn't work. Firefox, of course, can open it fine.
JPEG Details:
Dimensions: 1080X900
180 dpi
Bit depth 24
Color representation: uncalibrated
I've found some things talking about the images being compressed incorrectly (?) but I haven't been able to get it working...
Any clues?
IE8 drops support for CMYK JPEG and renders them as the infamous red X without so much as a warning.
If you have ImageMagick:
identify -verbose image.jpg
will show you the image colorspace. If it's CMYK, you can convert to RGB with:
convert broken.jpg -colorspace RGB fixed.jpg
If you need to do CMYK to RGB conversion on a whole batch of JPEG-images, this command may be helpful to you:
for i in *.jpg; do convert "$i" -colorspace RGB "$i"; done
PS: If you'd like to see what is going on, just add -verbose:
for i in *.jpg; do convert "$i" -colorspace RGB -verbose "$i"; done
I had a similar issue with IE8 not displaying two JPEG images. FF, Safari, Chrome all displayed them without complaint but IE acted as if the files were not there. I have no idea what was going on, but a quick image conversion to gif or png fixed the problem. Just another in a long line of confirmations that IE sucks.
Had similar problems with existing images, which will not show up in IE8.
Problem is, as converter42 says: CMYK-Images
Convert them to RGB colorspace and all is good
The Solution with the PNG is not the best, because PNG files can be MUUUCH larger than JPGS.
If you are using photoshop for creating the jpgs. Try the below.
Open the file and go to 'Image' menu
Go to Mode
Select RGB
Save and upload to server.
This should work.
Why are you dealing with the image at 180 dpi and not the 72dpi screen resolution? At screen resolution the image will be roughly double that size. Still, the size is manageable for any browser.
When creating a gadget, you should be using PNGs for all the elements of the gadgets. Are you having issues displaying JPEG photos?
Have you looked for the yellow bar at the top of IE that blocks certain suspicious content from being loaded (popups, activex, javascript, etc.)? If it appears, try telling it to "allow".
Lastly, what are you using to compress your images to JPEG?
EDIT: If you want to do batch conversion use the batch converter in photoshop or use the Actions panel to record the conversion process for a single image, then replay the action on an entire folder. Additionally, you can save this action to a "droplet" which is a small application containing the action that you can drop an image or folder on top to.
Alternatively, if you don't fell like learning Actions, XNView is an excellent image viewer and converter that supports something like 160 different image formats and can batch convert and batch rename huge lists of files.
I fixed this issue by opening the CMYK JPEG file in Windows Paint and then saving as a JPEG, which Paint encodes as RGB by default. Not a great solution because I'm sure that Paint's converter is not as robust as Photoshop's, but this can be a quick fix if the job needs to be done now and there's no access to the tools above.

Resources