Hi,
I'm trying to make a tool for my project which will extract the information from multiple animation psds generate a sprite sheet and output the info I need from these files.
I'd greatly appreciate it if anyone could kick start me in the right direction. So far I have everything built to code in c/c++ and I have a project going.
Each of my PSD constitutes 1 animation.
In the psd, I have:
a layer called "pivot" this is my sprites pivot point(basically a pixel to set the origin of my sprite)
a folder called "animation" with all my animation frames.
I need to step thru the animation frame by frame. find which layers are visible on each frame of the animation. Get the frame duration. And take the content of this frame and put it in a png at a certain position.
My tool is alot more complex then this but if I can get this to work I'm sure I can easily sort the rest out.
I have uploaded an example psd file here: http://www.sludgemonsters.com/Eat.psd
Thanks alot for the help!
Extracting PSD info
Re: Extracting PSD info
I've been trying a bunch of stuff but can't seem to get anything usefull.
heres an example of the code I've tried. image_info is always empty. so I take it thats why I can't get the label name.
heres an example of the code I've tried. image_info is always empty. so I take it thats why I can't get the label name.
Code: Select all
MagickCore::ImageInfo* image_info = CloneImageInfo((MagickCore::ImageInfo *) NULL);
strncpy_s(image_info->filename, l_psdPath.GetBuffer(), MaxTextExtent - 1);
MagickCore::ExceptionInfo exception;
GetExceptionInfo(&exception);
MagickCore::Image* image = MagickCore::ReadImages(image_info,&exception);
const char* szLayerName = GetImageProperty( &image[0], "label" );
MessageBox(szLayerName, "", NULL);