[PS Error]TIFF changes from MSB to LSB after adding metadata
Posted: 2014-04-29T10:16:54-07:00
Hello, this is my first post on this forum because i'm having a problem that is driving me nuts. (like most of the people that places a post here)
This problem may be related with the tiff library and not the c++ part, but since i'm using Magick++ i decided to post here.
I have an image that was created with Photoshop and saved has MSB. I inject some custom meta-data on the image (on comments and artist) and when i download it througth my app it is LSB instead of keeping the MSB.
I have tried to force it invoking but it only changes the FillOrder, the ExifByteOrder remains LSB instead of MSB.
The curious thing is that the 6.8.3 version was working, after adding on «ReadTIFFImage» function from tiff.c an invokation to:
Now i upgraded to the most recent version (6.8.9) because the old one had a memory leak problem, which was fixed, the code on that file evolved and when comparing the old version with the new one, the previous call does not make sense any more.
I cannot figure out how to solve this problem, can someone help me please? Feel free to ask for more details. I did not provided an image because any saved has MSB will do the "trick".
Sorry for not providing code, i will try to create a sample of the workflow i'm using if it's needed.
Thank you.
P.S.: The error is only displayed in photoshop, other image editing programs can open it.
P.S.2: Found the endian "problem" using Exiftool.
This problem may be related with the tiff library and not the c++ part, but since i'm using Magick++ i decided to post here.
I have an image that was created with Photoshop and saved has MSB. I inject some custom meta-data on the image (on comments and artist) and when i download it througth my app it is LSB instead of keeping the MSB.
I have tried to force it invoking
Code: Select all
image->endian(MagickCore::MSBEndian)
The curious thing is that the 6.8.3 version was working, after adding on «ReadTIFFImage» function from tiff.c an invokation to:
Code: Select all
(void) SetImageArtifact(image,"tiff:endian",TIFFIsBigEndian(tiff) == 0 ? "lsb" : "msb");
I cannot figure out how to solve this problem, can someone help me please? Feel free to ask for more details. I did not provided an image because any saved has MSB will do the "trick".
Sorry for not providing code, i will try to create a sample of the workflow i'm using if it's needed.
Thank you.
P.S.: The error is only displayed in photoshop, other image editing programs can open it.
P.S.2: Found the endian "problem" using Exiftool.