Jump to content

Image resize / crop in effect plugin


Recommended Posts

Is it possible to resize or crop an image in an effect?  (or operate like the magic wand and set the current selection area?)   I am developing a plugin with a set of effects to help in my job, one of which is to quickly identify a dialog in a screenshot and crop it (see example image). Given that the overridden Render method is dealing with ROI's (regions of interest) and updating an equally sized destination surface from a source surface, I'm thinking that an effect may not be the best place for this functionality.  

 

(Workaround: I could get the effect to set everything but the dialog to a single color making the magic wand selection tool with a low tolerance, then a selection inversion, able to identify the region to 'Crop to selection' work cleanly.)

 

 

o4o9wcv.png

Link to comment
Share on other sites

Hello Bruce - welcome to the forum!

As I understand, you cannot change the selection or canvas size from within a plugin.
The plugin rules are here btw:
http://forums.getpaint.net/index.php?/topic/13129-rules-for-plugins-that-are-published-on-this-forum/

On my 'Composition tool' plugin I change the unwanted areas to transparent white (bgra = 255,255,255,0) . Once the plugin has run, the user can select this area, invert the selection and crop to selection.

http://orums.getpaint.net/index.php?/topic/22810-composition-tool/

Hope that helps

 

Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings

 

PdnForumSig2.jpg

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...