Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I read the number of layers in an .ai file? #1530

Open
WangZiXiao-ChenDu opened this issue Jan 26, 2024 · 3 comments
Open

How can I read the number of layers in an .ai file? #1530

WangZiXiao-ChenDu opened this issue Jan 26, 2024 · 3 comments

Comments

@WangZiXiao-ChenDu
Copy link

WangZiXiao-ChenDu commented Jan 26, 2024

Magick.NET version

13.5.0

Environment (Operating system, version and so on)

C#

Description

How can I read the number of layers in an .ai file?
001.zip

Steps to Reproduce

using ImageMagick;

using (MagickImageCollection images = new MagickImageCollection())
{
images.Read(inputFilePath);
}

@dlemstra
Copy link
Owner

You can use PdfInfo.Create(inputFilePath) to get the number of layers in the .ai file?

@WangZiXiao-ChenDu
Copy link
Author

PdfInfo.Create

image
This way, the layer information cannot be obtained.
The .ai file in the example has four layers.

@dlemstra
Copy link
Owner

When I use ImageMagick on the command line this file also contains a single layer. You might want to reach out to GhostScript who's program we use to read this file and ask why we only get one layer? Maybe the other layers are invisible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants