midora Posted January 11, 2012 Share Posted January 11, 2012 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. Quote Link to comment Share on other sites More sharing options...
null54 Posted January 11, 2012 Share Posted January 11, 2012 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. Quote Plugin Pack | PSFilterPdn | Content Aware Fill | G'MIC | Paint 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 More sharing options...
midora Posted January 12, 2012 Author Share Posted January 12, 2012 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.