I have this piece of code that works with all images in the world (I have tried thousands - for real) except one JPG. When I try to load that image (it opens in IrfanView without problems) I get an access violation.
aBitmap.Assign(aGraphic.Graphic)
Any ideas?
Using: Delphi 7, Win 7 32bit
It is not my code's fault.
I just opened the image in PaintShop Pro 7 and saved it back (also as JPG). Now it works. It can be something wrong in Borland's code. Maybe it doesn't handle images that are not following the JPG standard? Anyway, the thing is it doesn't crash on LoadFromFile. I already secured that piece of code with TRY EXCEPT. It crashes on Assign.
Update: Looks like it was the CMYK bug: http://cc.embarcadero.com/item/19723