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

Obtain linked images information via the SDK (PPI, Dimension, Color Space etc)

New Here ,
Feb 25, 2021 Feb 25, 2021

Copy link to clipboard

Copied

Hi,

 

I am using the illustrator SDK for a plugin and have obtained a list of all the placed art in the artwork via:

 

AIMatchingArtSpec spec[]{{kPlacedArt,0,0} };
AIArtHandle** matchingArt = NULL;
ai::int32 artCount = 0;

sAIMatchingArt->GetMatchingArt(spec, 1, &matchingArt, &artCount);
for (ai::int32 n = 0; n < artCount; ++n)
{
	AIArtHandle artHandle = (*matchingArt)[n];
	// inspect
}

 

Then via the AIPlacedSuite I am attempting to read/inspect the properties, but only so far have I been able to obtain the path via GetPlacedFileSpecification/GetPlacedFilePathFromArt and I think src size /clr space.

 

Using GetRasterInfo which seems to have the correct size and colour space, is this the right thing to use?

 

Regarding the PPI information, I seem stumped and can't see any obvious place to where I could get this information.

 

Lastly, is there a simple way to get the apparent size in pixels of the resized image on the artwork. For instance the image has been placed then reduced by 50%, the "apparent" width and height would be half that of the source image.

 

Kind Regards

 

 

TOPICS
SDK

Views

83

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
no replies

Have something to add?

Join the conversation
Adobe