DrawImage() + #PB_Image_Raw

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
zxtunes.com
Enthusiast
Enthusiast
Posts: 375
Joined: Wed Apr 23, 2008 7:51 am
Location: Saint-Petersburg, Russia
Contact:

DrawImage() + #PB_Image_Raw

Post by zxtunes.com »

Code: Select all

  GrabImage(0, 11, xa1, ya1, w2, h2)

  If StartDrawing( WindowOutput(0) )
  
      DrawImage( ImageID(11), xa1*zoom,ya1*zoom, w2*zoom, h2*zoom, #PB_Image_Raw)
      
    StopDrawing()
  EndIf
VS

Code: Select all

  GrabImage(0, 11, xa1, ya1, w2, h2)
  ResizeImage(11, w2*zoom, h2*zoom, #PB_Image_Raw)
  
  If StartDrawing( WindowOutput(0) )
  
      DrawImage( ImageID(11), xa1*zoom,ya1*zoom)
      
    StopDrawing()
  EndIf
Shame that we have to go an extra ResizeImage due to the fact that changes the size DrawImaga always with smooth (interpolated). :?