I want to write a program that allows me to resize images and resave them.
I wrote this little piece of program to test but it doesn't work!
I would also like to know how to recover the wording of the error generated by Purebasic
Thank you for your help
Code: Select all
EnableExplicit
UseJPEGImageDecoder()
UsePNGImageDecoder()
Enumeration
#Image1
EndEnumeration
Global file$ = "c:\images\toto.jpg"
If LoadImage(#Image1, file$)
ResizeImage(#Image1, 380, 285)
If Not SaveImage(#Image1, file$ + ".png", #PB_ImagePlugin_PNG)
Debug "erreur" + " --> "
EndIf
EndIf

