RefreshedMango Posted February 22, 2020 Share Posted February 22, 2020 How would insert an image using code, and what file would I put it in? Or how could I do it with a URL? How would make the image start from lets say "Top Left Point (0,0)"? How would I cut out a rectangle so it is transparent (no background)? How would I make a rectangle with 1 thickness and start from (0,0 top left) to (0,0 bottom right)?I have looked everywhere and I cant find an answer. I am using c# language and codelab.Your help will be very much appreciated. Quote Link to comment Share on other sites More sharing options...
Pixey Posted February 22, 2020 Share Posted February 22, 2020 Hi @RefreshedMango and Welcome Perhaps you should start here: Quote 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. Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 23, 2020 Share Posted February 23, 2020 10 hours ago, RefreshedMango said: How would insert an image using code, and what file would I put it in? Or how could I do it with a URL? You could put it in any file. The filename won't matter unless you hard code it and it's path (NOT recommended). Use the FileSelect dialog as a file picker. It will allow you to navigate to the file and (I think) will also accept URL's. Alternatively you could copy the image to the clipboard and access that from within CodeLab. 10 hours ago, RefreshedMango said: How would make the image start from lets say "Top Left Point (0,0)"? Not sure what you're asking here. Images are generally accessed from the top left corner. Are you asking about copying source [0,0] to destination [0,0]? 10 hours ago, RefreshedMango said: How would I cut out a rectangle so it is transparent (no background)? See the code I posted in you other thread. In it I set CurrentPixel to ColorBrga.Transparent. In the same way you set a pixel to a color, you can set it to transparent. So simply set the pixels in your rectangle to ColorBgra.Transparent. 10 hours ago, RefreshedMango said: How would I make a rectangle with 1 thickness and start from (0,0 top left) to (0,0 bottom right)? In your Render loop insert a test for rect.Top or rect.Bottom or rect.Left or rect.Right. If any are True the current [x,y] location is on one of the four edges. (Re)color it accordingly. 10 hours ago, RefreshedMango said: I have looked everywhere and I cant find an answer. I am using c# language and codelab. There are links to some excellent tutorials here: https://forums.getpaint.net/topic/109990-how-to-write-an-effect-plugin-tutorialsresources/ If you're starting out try ReMake's "First Steps" tutorials! Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker 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.