Jump to content

UI to create layers, edit layers and export jpgs


Recommended Posts

Hi all

I'm new to using Paint.NET. It appears to be a great product and I look forward to using it from now on for my image editing needs.

I'm wondering how to create a UI to give end users the following functionality:

  • * A button that when clicked will create 4 layers with transparency property of 128 above the background layer.
    * A button that merges the rectangle select tool with the paint bucket tool. That is, when the user draws a rectangle selection it should automatically fill it in with a hard coded colour (dependant on which layer is picked).
    * A button that will export jpg images. Each image is to have the background layer plus 1 of the higher layers.

I was going to use the Effects template available in the effects/programming forum, however I read that the effects API doesn't have access to image layer information.

Link to comment
Share on other sites

  • 3 weeks later...
Hello.

Point 1) Could you explain how it would be practical to have exactly four layers all with the same opacity? How would this benefit the majority of users? I'm not being funny, I do seriously want to know.

Point 2) The Rectangle fill tool (:RectangleTool:) will do this very action when used in the Draw Filled Shape mode (:ShapeInterior:). This can be said for all the filling tools found at the bottom of the Tools window. The different modes can be found (when the tool is in use) beneath the Print icon.

Point 3) You can already 'export' to .jpg by going to the File > Save As and clicking the drop down menu called 'Save as type', there you will see a range of file types you can use. Although .jpg doesn't support layers you can select what is saved by ticking or unticking the check boxes next to each layer. What ever is seen on the canvas at the time is what will be saved.

I hope this may have solved a few problems for you and in the process lessen any work you were thinking of doing. As for the more coding aspect of your post I'm sure another member will be able to help you better than I can.

Hey, myrddin, I'm guessing that his questions come from a "script-it-like-it's-GIMP" direction, and in that sense, they're completely understandable.

I can think of plenty of reasons to want to be able to do any of those things and more, but they are currently outside the scope of the APIs that Rick is exposing. If you wanted to write a "script-fu" type plugin that automatically made, say, a set of image buttons for use on a web page (different colors for normal, hover, active, and visited), this might be the way you'd approach it.

AdamN, as far as I know, what you want to do can't currently be scripted, so it's a matter of doing it by hand. I probably would have asked this question in the "Effects API" section.

drakaan sig jan 2020.png

Link to comment
Share on other sites

You do know I deleted that post? I thought it's been over fifteen days, AdamN hasn't posted elsewhere in the forum nor has bumped this thread so I thought AdamN wouldn't even read my post anyway. Though, if you do come back AdamN my response in Drakaan's post is correct and still stands.

Link to comment
Share on other sites

You do know I deleted that post? I thought it's been over fifteen days, AdamN hasn't posted elsewhere in the forum nor has bumped this thread so I thought AdamN wouldn't even read my post anyway. Though, if you do come back AdamN my response in Drakaan's post is correct and still stands.

I didn't know that...I look at that forum pretty much daily, and noticed the new message, but not the age of the original. Actually, your message was still there this morning, or else I wouldn't have been able to have it quoted like that.

drakaan sig jan 2020.png

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.

×
×
  • Create New...