You have to use all three elements: LoadImage, ResizeImage and ImageGadget. The first two make sense (since they are documented) but a new person will forget to declare the object using ImageGadget! They will think that LoadImage does the work of creating the object. "And" the UseJPEGImageDecoder() is also kind of important...

Yes, I reviewed the manual and every occurrence of ResizeImage on the forum. Don't shoot me please!
Here is simple code that new people can get their heads around:
Code: Select all
If OpenWindow(0, 100, 100, 500, 300, "PureBasic - Image")
UseJPEGImageDecoder()
If LoadImage(1,"C:\Image.jpg") ;Change the path to your image...
ResizeImage(1, 300, 250)
ImageGadget(1, 10, 10, #PB_Ignore, #PB_Ignore, ImageID(1))
EndIf
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
EndIf