Jump to content
How to Install Plugins ×
Paint.NET 5.1 is now available! ×

Recommended Posts

Posted

OMG, look out!  @Pixey will be writing her own plugins soon! :lol:

 

BTW, @MadJik, this is a very unique and interesting plugin. I don't think there is another plugin designed to be unique for every user that has it.  Great idea.

 

One question, if the text points to a graphic, do you have a "zoom" slider?

 

Here is some code you could use to "zoom" a loaded bitmap:

Spoiler

public static Image ResizeImage(Image image, int width, int height)
{
    var destRect = new Rectangle(0, 0, width, height);
    var destImage = new Bitmap(width, height);

    destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution);

    using (var graphics = Graphics.FromImage(destImage))
    {
        graphics.CompositingMode = CompositingMode.SourceCopy;
        graphics.CompositingQuality = CompositingQuality.HighQuality;
        graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        graphics.SmoothingMode = SmoothingMode.HighQuality;
        graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;

        using (var wrapMode = new ImageAttributes())
        {
            wrapMode.SetWrapMode(WrapMode.Clamp);
            graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode);
        }
    }

    return (Image)destImage;
}

 

 

  • Upvote 2
Posted

New version:


Signature_Demo05.png  Signature_Demo06.png

 

- Some more comments inside the code for better understanding (IMO).
- Slider Size works with images (10=100% no resize, 20=resize 2x, 5=reduce 50%)
    (thanks @BoltBait for the idea and the routine)
- Drop down lists with numbers (easier to write the code)
- Secondary color choice could draw a rectangle (text only)
- Catch error to avoid crash if the image can't  be found.

 
Known (Codelab?) issues:
-Text in the RegionUI is destroied when you use the UI editor and when you build the DLL.
-Trailing spaces in the text are trunked (if you want to enlarge the rectangle, it is possible to use Alt+0160 instead space)
-Font name is useless as a preliminary choice, the first name of the list of font is always shawn when you run the effect.
-Some font families make the calculation of the text size wrong (position of the rectangle or margin could look unexpected).

Posted

Sorry this took so long @Seerose.  My screen ware had changed since I last used it, so I had to relearn :grin:.

 

I hope this video will help to show how the code lab works.

 

 

  • Like 2

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Posted

<3 Dear @Pixey

 

First of all, I would like to thank you for great video instructions.:trophy:

After the code lab. opening with me everything looks completely different. (Signature.cs) 

What should I do? 

 

signature.png

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Posted

Yes, that is the correct .cs you have opened.  Then you have to change certain things in the areas I show in the video.

 

Make sure you can see the line numbers in the .cs

 

lines.png

 

Then you must change certain things in the code:

 

1.  On line 10 ..... change false to true

2.  Line 39 ...... put your name where is MadJik's name

3.  Line 49 ..... remove the two green slashes //  at the beginning of the lines of 49, 50, 51 & 52

      then add your colors in the brackets (0 , 0, 0, ) etc;

 

 It IS a rather complicated thing to do @Seerose and it took me a while to understand it myself :grin:  One needs a lot of patience =O

  • Like 1

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Posted

<3 @Pixey

 

Because I have no idea why I sometimes ask a lot more often. Video tutorial is perfect.
Everything has its times. I try it out for the weekend. Thanks again. :cake: :coffee:

Sorry! Rep.punkt comes later (tomorrow).

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

  • 3 years later...

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