example_01.bmx 474 B

12345678910111213141516171819202122232425262728293031323334
  1. SuperStrict
  2. ?win32
  3. Framework SDL.d3d9sdlmax2d
  4. ?Not win32
  5. Framework SDL.gl2sdlmax2d
  6. ?
  7. Import Image.Raw
  8. Import BRL.Standardio
  9. Local pix:TPixmap = LoadPixmap("gh2.rw2")
  10. If pix Then
  11. Print pix.width + ", " + pix.height
  12. Else
  13. Print "Unable to load file"
  14. End
  15. End If
  16. Graphics 1024, 768, 0
  17. local resized:TPixmap = ResizePixmap(pix, 1024, 768)
  18. Local img:TImage = LoadImage( resized )
  19. While Not KeyDown(KEY_ESCAPE)
  20. Cls
  21. if img Then
  22. DrawImage img, 0, 0
  23. End If
  24. Flip
  25. Wend