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

Gradient, Patterns, and Raster image Resolution

Community Beginner ,
Jan 06, 2014 Jan 06, 2014

Hi All,

I have a requirement to list count of gradient and patterns, ppi value of raster images. If i try to retrieve the count of gradient and patterns,

it lists unused gradrients and patterns. Please help me to list out count which shows in document info.

Here is the code i tried:

//Pattern count

ai::int32 idPatternCount = 0;

sAIPattern->CountPatterns(&idPatternCount);

//Gradient count

ai::int32 idGradientsCount = 0;

sAIGradient->CountGradients(&idGradientsCount);

In the API document, i am not able to find the method to retrieve raster image PPI. Please help me on this.

Regards,

Selva

TOPICS
SDK
1.2K
Translate
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
Guest
Jan 06, 2014 Jan 06, 2014

You can calculate it by using the function GetRasterInfo at Raster Suite. The bounds of the AIRasterRecord - size of raster object in pixels.

Translate
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
Guide ,
Jan 07, 2014 Jan 07, 2014

CountPatterns() & CountGradients just tell you what's in the document pattern & gradient lists, so it makes sense that wouldn't be helpful. I don't think there's anything in the API that lets you know what's 'in use' for anything like that, including symbols or graphic styles as well.

Translate
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
Community Beginner ,
Jan 07, 2014 Jan 07, 2014

Is there any other way to get used patterns and gradients count.

Translate
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
Guest
Jan 07, 2014 Jan 07, 2014

It is possible, for example, maybe to remove unused by PlayActionEvent and then count

Translate
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
Community Beginner ,
Jan 18, 2014 Jan 18, 2014

There is no menu optios to select unsed gradients and patterns. Can you please help me with sample code to select and remove unsed gradients and patterns.

Translate
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
Guest
Jan 18, 2014 Jan 18, 2014

Gradients and patterns - is also swatches. So, perhaps, you can remove unused swatches and then CountGradients and CountPatterns?

Have you tried to work as a functions ValidatePattern and ValidateGradient?

Translate
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
Community Beginner ,
Jan 29, 2014 Jan 29, 2014
LATEST

I tried ValidatePattern and ValidateGradient, it lists both used and unused the patterns and gradients.

Translate
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