Thursday, March 22, 2012

(BUG?)Some JPEGs not showing correctly in PDF-Export

Hi,

we've some pictures from broken machines, they are taken with a digital camera and should be showed within a report.
But some Pictures don't display correctly:
I want to add this image.
In PreviewMode or if exporting to Tif-Images everything looks fine, but if I export to PDF the Image looks like this (resized, but it also looks so if I don't resize it).

If I open the file in Paint.net and save it again everything is okay.. But its strange for the users that this picture shows up correctly everywhere except the PDF-Export. So they say its a problem of PDF export and not of the image..

Does anybody have a similar issue and a solution for this problem?
It doesn't matter if I retrieve the jpeg from a database or from disk, this problem always occurs.
I tried this with and without SP1-> same problem..

Any help would be appreciatedI found the problem by hex-editing the PDF..
Some picutures ( like the one in the link above) get marked as grayscale though they are RGB!!
If you manually change
/XObject /Subtype /Image /ColorSpace /DeviceGray /BitsPerComponent 8 ....
to
/XObject /Subtype /Image /ColorSpace /DeviceRGB /BitsPerComponent 8 ....
and open the PDF the images are okay!

So, thats the bug, but who can give me a solution?
(Editing the PDF afterwards is no solution ;))|||I analysed the files, the problem seems to occur if the Huffman table marker (FFC4) Header shows up prior the Start of frame marker (FFC0)!
I don't know if the jpegs aren't "well formed" if huffman table marker comes first but other programs process them correctly..

If I manually move the start of frame marker to some position prior the Huffman table marker the pictures show up correctly (the pdf says /DeviceRGB)..|||We also have noticed this problem, though I don't know my way around Jpeg files well enough to verify the frame sequencing problem you identified above.

I do not believe that we saw this problem until I applied SQL Server 2005 Service Pack 1 last week.

Do you have the service pack applied?|||

We are also having the same problem and we do have SP1 installed on SQL 2005. Is there still no fix for this issue ? Please help.

|||I've reported that as Bug, take a look at:
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=152109

MS Comment:
This is a duplicate of

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=152109.

It has been fixed for the upcoming Service Pack 2.

It's a duplicate of itself;) But they seem to fix it..

No comments:

Post a Comment