Say I have an open image, is there a way to add a pixel or more to the width of it - To make it one pixel wider, 256x400 instead of 255x400.
Is there a way to copy an image into file to an open image, the open image being bigger than the image to be copied, and copying it will not change the size of the current image resulting in the current image containing the copied image in a corner?
What I am looking to do is be able to use POINT() on all points of the current image +1 on the width and as I am outputting Floyd Steinberg dithering, if the image is only the size it that Copyimage() imports, then I cannot use POINT(x+1,y).
How to add a pixel width to an image.
Re: How to add a pixel width to an image.
Some pseudo code:
- Load or create source image.
- Create new image 1 pixel wider than source image.
- Draw source image into new image.
- Save (or use) new image.
- Free source image if no longer needed.
Re: How to add a pixel width to an image.
Drawimage(), of course, now wouldn't it be useful if that was in the image index.Demivec wrote: Wed Jun 26, 2024 4:51 am Some pseudo code:
- Load or create source image.
- Create new image 1 pixel wider than source image.
- Draw source image into new image.
- Save (or use) new image.
- Free source image if no longer needed.
Thanks Demivec.
-
DarkDragon
- Addict

- Posts: 2347
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: How to add a pixel width to an image.
It's better in the 2D Drawing section, since it's more related to StartDrawing/StopDrawing similar to QPainter in Qt or Canvasses in Android or Graphics in Swing.matalog wrote: Wed Jun 26, 2024 8:55 amDrawimage(), of course, now wouldn't it be useful if that was in the image index.Demivec wrote: Wed Jun 26, 2024 4:51 am Some pseudo code:
- Load or create source image.
- Create new image 1 pixel wider than source image.
- Draw source image into new image.
- Save (or use) new image.
- Free source image if no longer needed.
Thanks Demivec.
https://www.purebasic.com/documentation ... index.html
bye,
Daniel
Daniel
