• Welcome to Vampyre Imaging Library Forum. Please login or sign up.
 

psd transparency

Started by kores, 18 November 2007, 20:39:46

Previous topic - Next topic

kores

Hello,

I'm trying to open a psd file, but the transparency information is always lost.
Is this the "normal" behavior or am I doing something wrong?

Thank you

Galfar

Could you post some non working image here please?
PSD loader only reads raster data, no layers, objects, etc.
Transparency stored in alpha channel works ok (tested with CS2).

kores

I was trying to open the following image: http://rapidshare.com/files/70858462/test.psd.html
In Photoshop it shows a transparent background. But when I open it it has a completely white background.


  image := TSingleImage.Create;
  image.Format := ifA8R8G8B8;
  image.LoadFromFile('test.psd');

  p := Image.ScanLine[j]; //   p: PRGBQuad;


p.rgbReserved is always 255. When i see that in Photoshop it has transparency information I would expect to be able to get it programatically.
Is there a way to get the transparency, or I must live with the white background  :) ?

Thank you.

Galfar

Could you please upload it as attachment on the forum? I have problems
downloading it from rapidshare.

kores

Sorry about that. I've attached the file.

Galfar

As I wrote before Imaging's PSD loader doesn't read layer information which is how transparency is stored in your image. You need to get your transparency into alpha channel (and set image mode from CMYK to RGB as Imaging currently doesn't read alpha channel of CMYK images).

How I made attached Imaging compatible transparent PSD from your image:
1. 'Merge Visible' the two image layers
2. 'Select Layer Transparency' on merged layer
3. Set 'Image->Mode' to RGB
4. 'Save selection as channel' which created alpha channel with proper transparency
5. Finally save the file

Complicated, but at least both PSD layers and native CMYK data formats will be supported in
upcoming Imaging 0.3x.


Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name:
Email:

Shortcuts: ALT+S save/post or ALT+P preview

SMF spam blocked by CleanTalk