[magick-developers] Read/write PSD files

MacStrix macstrix at micro.lt
Tue Jun 26 11:40:27 PDT 2007


Hello,

I am new to IM and I have got some troubles using it.

Currently I am interested in PSD files support. I understand that  
this is very complicated due to closed file format, but I wanted to  
ask if IM can open and save PSD files? I want to open PSD file,  
perform some actions and save it back to .psd file.

I performed this simple test (found somewhere in forum) on OS X:

----------------------------------------------
MagickWand *magick_wand;

MagickWandGenesis();
magick_wand = NewMagickWand();
if ( MagickReadImage(magick_wand,"Test.psd") == MagickFalse ) NSLog 
(@"MagickReadImage failed");
	
NSLog(@"format: %@", [NSString  
stringWithUTF8String:MagickGetImageFormat(magick_wand)] );
NSLog(@"type: %d", MagickGetImageType(magick_wand) );		

if ( MagickWriteImages(magick_wand, "Test_result.psd", MagickTrue) ==  
MagickFalse ) NSLog(@"MagickWriteImages 2 failed");
	
magick_wand = DestroyMagickWand(magick_wand);
MagickWandTerminus();
----------------------------------------------

format logs "PSD" and type - 7, which means "TrueColorMatteType". And  
the "Test_result.psd" image is not readable.
I am using: Version: ImageMagick 6.3.4 06/26/07 Q8 http:// 
www.imagemagick.org

So this is know behaviour or I am doing something wrong?

Thank you for any ideas.

MacStrix


More information about the Magick-developers mailing list