Page 1 of 1

Reading/Writing PSD files

Posted: 2007-06-26T11:51:32-07:00
by MacStrix
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:

Code: Select all

----------------------------------------------
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 known behaviour or I am doing something wrong?

By the way. The same result (unreadable image) I am getting with "convert test.psd newpsd.psd".

Thank you for any ideas.

MacStrix