Image resizing utility?
#3
(07-19-2022, 05:49 PM)SMcNeill Wrote: Everything you want to do can be done easily with the SaveImage library.

Basic pseudocode for the routine would be the following:

'$INCLUDE:'SaveImage.BI'

DO
    'LoadImage file that you want to resize/reformat
    'NewImage a screen to the size that you want the file to be saved as
    '_PutImage ,loadimageHandle, newimageHandle to put and scale the original image onto the new image
    'x = SaveFullImage("exportFileName.EXT", newimageHandle)
    'Free Unused Images
LOOP UNTIL finished with all the files you want to change

'$INCLUDE:'SaveImage.BM'


And that's basically it!

Just change the SaveFullImage extension to the extension that you want to save your file as:  BMP, GIF, JPG, or PNG -- the routine will do all four export types, based upon what extension you specify with the filename.

Change the NewImage(x, y, 32) x and y size to the size that you want to resize to.

https://staging.qb64phoenix.com/showthread.php?tid=20 <-- SaveImage library is here.

This is awesome, thank you.
Reply


Messages In This Thread
Image resizing utility? - by madscijr - 07-17-2022, 08:04 PM
RE: Image resizing utility? - by SMcNeill - 07-19-2022, 05:49 PM
RE: Image resizing utility? - by madscijr - 07-19-2022, 07:54 PM
RE: Image resizing utility? - by mnrvovrfc - 07-25-2022, 10:46 PM



Users browsing this thread: 2 Guest(s)