• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reading image layers

New Here ,
Feb 10, 2008 Feb 10, 2008

Copy link to clipboard

Copied

Hi guys,

I am developing an application to read an image format and convert it to my proprietary format. I want to read/get the layer information of the image, each graphic object associated with the image.

I downloaded CS SDK but unable to identify the component/APIs. Can you please help me in identifying the same.

Thanks in advance
Sudharsan
TOPICS
SDK

Views

1.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

So, you are looking to automate Photoshop from your application, to
have it do the task? Or you're looking to add on a Photoshop format
plug-in to have it export to your proprietary format (which sounds a
better fit for the SDK).

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 11, 2008 Feb 11, 2008

Copy link to clipboard

Copied

...or do you want to passively parse PSD?

You'll need the "Advanced" SDK to find out anything about PSD/PSB, but the documentation is rather incomplete. http://telegraphics.com.au/svn/psdparse/trunk is source code for a program to parse it - at least, that part that was documented sufficiently or I could figure out.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 15, 2008 Feb 15, 2008

Copy link to clipboard

Copied

I want to read Bartender (CD labelling image) format and create my own CD label image. Photoshop is able to load the bartender file and also allows to get the layers from it.
So, I thought I could use photoshop SDK to load the file and get the graphic information from the file and create my own format.

Any suggestions on this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 17, 2008 Feb 17, 2008

Copy link to clipboard

Copied

Maybe you can use the Photoshop SDK, but you don't make it clear
whether you completely understand what the SDK is. It is a set of
tools for adding on to Photoshop, or automating Photoshop.

The "obvious" way to do this is to add an export module to Photoshop,
so people can save anything open in Photoshop into your file format.

What do you mean by "graphic information", though - do you just mean
the raster images of each layer?

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 18, 2008 Feb 18, 2008

Copy link to clipboard

Copied

Hi all,
I am using PSD file documentation to make the psd parser.. I would like to ask inside the Layer and Mask Information section, there is line written on Channel Image Data i.e. "If the layer's size, and therefore the data, is odd, a pad byte will be inserted at the end of the row"
What is meant by this line exactly and what i have to do in this case..
I am reading it in to the buffer..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 18, 2008 Feb 18, 2008

Copy link to clipboard

Copied

I don't have that document, but this is a very common feature of image
file formats. If so...

Image data is stored in rows, so the first piece of data is the first
row (top or bottom), the second piece of data is the second row, and
so on.

What this is saying is that each row will start on an even numbered
byte. So if the rows occupy, say, 224 bytes, they will follow each
other exactly. But if the rows occupy 225 bytes there is an extra
byte. Each row uses 226 bytes, but only the first 225 bytes are used.

Some image formats have padding only to a byte boundary (e.g. PDF
images), some might have other rules (e.g. BMP pads to a multiple of 4
bytes).

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 18, 2008 Feb 18, 2008

Copy link to clipboard

Copied

> I am using PSD file documentation to make the psd parser..

If you want an already written parser, try my http://telegraphics.com.au/sw/#psdparse - Trying to puzzle out all the ambiguities and omissions of the PSD documentation is an unrewarding few hundred hours, good luck.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2008 Feb 19, 2008

Copy link to clipboard

Copied

hi again,

Actually i have tried all this by adding a byte in my destination buffer and i have skipped 1 byte in my source buffer but neither of them worked..in getting the image when data is odd(i am getting image when data is even).
fyi http://www.fileformat.info/format/psd/egff.htm

I think you have given me a plug in for a psd file. but i need the logic to solve this problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 19, 2008 Feb 19, 2008

Copy link to clipboard

Copied

>Actually i have tried all this by adding a byte in my destination buffer and i have skipped 1 byte in my source buffer but neither of them worked..

What format are you trying to convert INTO? What are its row alignment
requirements?

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2008 Feb 19, 2008

Copy link to clipboard

Copied

Thanks anyways

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

Hi Aandi,
While reading the source buffer i am storing bytes into the integer buffer and after reading all the channels in to separate buffers, i am combining all the channel buffers in to single surface(Directx).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 20, 2008 Feb 20, 2008

Copy link to clipboard

Copied

I don't know anything about DirectX, but what are its row padding
requirements?

Also, have you tried looking directly at the data returned for the
layers to see whether it matches your expectation? A small white
bitmap with a 1-pixel wide left border is a good starting point.

Aandi Inston

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

Hi Aandi,
I have checked, there is no row padding requirements for the surface in DirectX. and i have tried your method by adding a bitmap of one pixel but the result was same(corrupt image)......I have tried all the possibilities to decode the line("If the layer's size, and therefore the data, is odd, a pad byte will be inserted at the end of the row") but always the result was same..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 21, 2008 Feb 21, 2008

Copy link to clipboard

Copied

> i need the logic to solve this problem.

The logic is in the source code I linked you to. Good luck, you're beginning to see the value of the documentation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 22, 2009 Mar 22, 2009

Copy link to clipboard

Copied

HI,

I need two important information regarding the PSD..

1.Is it possible to extract the RGB information of each layer using..If so how??

2.If i draw a simple Circle in adobe photshop and save it as hello.psd.Later while extracting the hello.psd using the psd parser, how will i know that the image is a circle??

Kindly help me regarding the same..

Eagrly waiting for your kind anticipation,

Regards,
"Santosh"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Mar 22, 2009 Mar 22, 2009

Copy link to clipboard

Copied

LATEST
Santosh, my source code answers (1). re: (2) - you don't, in a raster layer. The circle is rendered to pixels by Photoshop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines