Reading/Writing PSD files

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
MacStrix

Reading/Writing PSD files

Post 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
Post Reply