Jump to content

Effect plugins: Access to resolution/metadata


midora
 Share

Recommended Posts

What's the best way to access the resolution of the image (inside of an effect plugin).

In the moment it seems to me that there are only pixel based algorithms used by effects (i.e. grid plugin)

For sure you could always do your own calculation but this is not so user-friendly.

In general it would be nice if an effect plugin could access metadata of the document and the active layer (read and write).

This would allow to remember layer specific data usable by the plugin.

midoras signature.gif

Link to comment
Share on other sites

In PSFilterPdn I use a Graphics.FromImage call on the aliased source bitmap, although it always returns 96 as the DPI probably because PDN does not set it when CreateAliasedBitmap is called.

I agree with accessing the metadata, that would allow me to implement the suite that Photoshop plugins can use to communicate with each other.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

In PSFilterPdn I use a Graphics.FromImage call on the aliased source bitmap, although it always returns 96 as the DPI probably because PDN does not set it when CreateAliasedBitmap is called.

I agree with accessing the metadata, that would allow me to implement the suite that Photoshop plugins can use to communicate with each other.

I guess none of these surface/image/bitmap functions are returning something useful because these objects are temporary.

I would be happy to create grids and patterns based on an inch/cm raster depending on the resolution of the image (w/o calculating the pixels size first).

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...