I started a project that requires reading PSD's and merging certain layers together to make different combinations of images. I started off with imagemagick9-dev by just loading the package. This worked up 'till the point where I found the problem that any of the layers using opacity had the levels inverted. (I noted a bug somewhere relating to this that suggested there was a fix in). After this I removed imagemagick default installs and compiled it from source using the latest version (6.3.5) At this point the PSD's are no longer loading correctly. I get perhaps a couple frames that look correct before they become garbage data, and none of the meta-data is valid 'layer-name' and such are all blank.
So I'm wondering if anyone knows if there has been something broken between the dev9 release and the latest for loading PSD's. Is it possible I'm missing something in the configure flags as well? All the functions run correctly and I am getting the first couple frames of PSD images (not meta-data) loaded before they get broken. I am also aware that with dev-9 version there was a problem where if the frames were larger then the image background everything for that frame and after would be broken, I corrected that in the PSD image seeing no need to have frames overlapping the background but just to make a note that this should not be a problem. Thoughts on getting this to work/anything I might have missed?
My system is ubuntu 64 version 7.04.
Problems reading PSD's with 6.3.5
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Problems reading PSD's with 6.3.5
Can you give a link to an example PSD image that is 'broken'. As well as an example command you are trying to use?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Problems reading PSD's with 6.3.5
I have set up a sample of the PSD at:
http://madd.ebk.ca/sh.psd
Things to note:
- When running this under Dev9 the following layers are not coming out as shadows:
Shadow Overlay
Layer 118
This is still happening when I make them the only 2 layers that I load with 6.3.5 So I dont think this problem is fixed.
When using dev9 though all other layers load up correctly, with the latests they go fuzzy at different points.
The layer-name fails to print with 6.3.5 this is working correctly with dev9
sample code
----------------------------------------------------
#include <iostream>
#include <Magick++.h>
using namespace std;
using namespace Magick;
typedef list<Image> type_imageList;
int main()
{
type_imageList imageList;
readImages( &imageList, "sh.psd" );
Image output_Image;
//Iterate through the list:
for(type_imageList::iterator iter = imageList.begin(); iter != imageList.end(); iter++)
{
if( iter == imageList.begin() )
appendImages( &output_Image, imageList.begin(), imageList.begin() );
else
output_Image.composite( *iter,
atoi(iter->attribute("[layer-xpos]").c_str()),
atoi(iter->attribute("[layer-ypos]").c_str()),
OverCompositeOp);
//print the layer name to console
cout << iter->attribute("[layer-name]") <<endl;
//print the layer only
iter->display();
//show the composite image at this point in time
output_Image.display();
//displayImages(iter, iter); //debugging, show frames one at a time
}
//convert the image to be cmyk
output_Image.colorSpace( CMYKColorspace );
//considerably reduce the amount of black channel applied to the image
output_Image.levelChannel( BlackChannel, 0.9*QuantumRange, 0.1*QuantumRange, 0 );
//print the image as a pdf
output_Image.write( "test_output.tif" );
}
Any help would be greatly appreciated Thanks!
- Dave
http://madd.ebk.ca/sh.psd
Things to note:
- When running this under Dev9 the following layers are not coming out as shadows:
Shadow Overlay
Layer 118
This is still happening when I make them the only 2 layers that I load with 6.3.5 So I dont think this problem is fixed.
When using dev9 though all other layers load up correctly, with the latests they go fuzzy at different points.
The layer-name fails to print with 6.3.5 this is working correctly with dev9
sample code
----------------------------------------------------
#include <iostream>
#include <Magick++.h>
using namespace std;
using namespace Magick;
typedef list<Image> type_imageList;
int main()
{
type_imageList imageList;
readImages( &imageList, "sh.psd" );
Image output_Image;
//Iterate through the list:
for(type_imageList::iterator iter = imageList.begin(); iter != imageList.end(); iter++)
{
if( iter == imageList.begin() )
appendImages( &output_Image, imageList.begin(), imageList.begin() );
else
output_Image.composite( *iter,
atoi(iter->attribute("[layer-xpos]").c_str()),
atoi(iter->attribute("[layer-ypos]").c_str()),
OverCompositeOp);
//print the layer name to console
cout << iter->attribute("[layer-name]") <<endl;
//print the layer only
iter->display();
//show the composite image at this point in time
output_Image.display();
//displayImages(iter, iter); //debugging, show frames one at a time
}
//convert the image to be cmyk
output_Image.colorSpace( CMYKColorspace );
//considerably reduce the amount of black channel applied to the image
output_Image.levelChannel( BlackChannel, 0.9*QuantumRange, 0.1*QuantumRange, 0 );
//print the image as a pdf
output_Image.write( "test_output.tif" );
}
Any help would be greatly appreciated Thanks!
- Dave
Re: Problems reading PSD's with 6.3.5
Seems some attributes accessible now via more simplified interface like label() method.
So was:
iter->attribute("[layer-name]")
now:
iter->label()
So was:
iter->attribute("[layer-name]")
now:
iter->label()