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

New to this - my head hurts - a few pointers anyone, please?

New Here ,
Nov 05, 2006 Nov 05, 2006

Copy link to clipboard

Copied

Hi all,

I've setup the samples, converting them back to compile in VS6 etc, and all that works ok. However, I'm having difficulty getting my head round what I want to do, so...

1. I want to draw a preview of the current image in a rectangle on my dialog box. How? I can see a DisplayPixelsProc() callback but it requires a PSPixelMap parameter - where do I get one of those from in an automation plugin?

2. How do I retrieve the pixel dimensions of the current document? The following gives an unhelpful answer

double width;
DescriptorUnitID unit = unitPixels;
error = PIUGetInfo(classDocument,
keyWidth,
&width,
&unit);

It seems confused by the current PPI setting. If I query a document which is 300 pix wide and PPI=72 then the answer is correct. But if the document happens to be set at 360 ppi then the answer is scaled by 72/360 to 60 (at least that's what I deduce is happening).

3. Generally I haven't quite got my head around the idea of whether I'm supposed to think in terms of callbacks, suites or COM automation.

I'd be very appreciative if anyone can point me in the right directions.

Thanks
Miles
TOPICS
SDK

Views

523

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
Adobe Employee ,
Nov 06, 2006 Nov 06, 2006

Copy link to clipboard

Copied

See the Dissolve example for using displayPixels. You have your work cut out for you because you are trying to display in an automation plug-in. See the AutomationFilter / Hidden combination for getting pixel information into an automation plug-in.

You will need to get the resolution and width height to get the exact information. 72 ppi is assumed in many cases.

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 ,
Nov 07, 2006 Nov 07, 2006

Copy link to clipboard

Copied

Tom,

Ding! The light goes on. To my eternal shame I now see your hint is already in the documentation, on p96 of the API guide. I suppose it hadn't dropped into place when I read it first time.

Anyway, thanks. I'll get back with another question if I stumble (after making really sure I can't find the answer elsewhere...)

Miles

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 ,
Nov 07, 2006 Nov 07, 2006

Copy link to clipboard

Copied

Tom,

Actually, one supplementary if I may?

Can the automation and hidden filter plugins exist in the same DLL? I can see a Merge Plugins utility which seems to be for the Mac. I can't see an example PIPL resource with two entrypoints but it must be possible.

Thanks
Miles

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
Nov 07, 2006 Nov 07, 2006

Copy link to clipboard

Copied

Each logical plugin would need a separate PiPL resource.
But it is possible.

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 ,
Nov 07, 2006 Nov 07, 2006

Copy link to clipboard

Copied

LATEST
Chris,

Ok, I think I can work with that.

Thanks
Miles

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