It is currently Sun Sep 15, 2019 11:02 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [Done] ResizeImage #PB_Image_Smooth) corrupts image on QT
PostPosted: Wed Jan 30, 2019 6:47 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10524
Location: Beyond the pale...
Purebasic 5.70x64, Ubuntu 18.04LTS QT subsystem.

This one took me an age to track down having had to rip apart a huge program to get to the bottom of some wayward drawing!

Title says it all. Images are being corrupted on Resize if the default #PB_Image_Smooth flag is used. Fine with #PB_Image_Raw. Fine with GTK 3. Seems to be under the QT subsystem only.

Code:
If OpenWindow(0, 0, 0, 200, 200, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  CreateImage(1, 20, 20)
  ;Resize and paint.
    If ResizeImage(1, 100, 100, #PB_Image_Smooth)
      If StartDrawing(ImageOutput(1))
        Box(0, 0, OutputWidth(), OutputHeight(), $FF0000)
        StopDrawing()
      EndIf
    EndIf
  ImageGadget(0,  10, 10, 0, 0, ImageID(1), #PB_Image_Border)     ; imagegadget with border
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeImage(..., #PB_Image_Smooth) corrupts image on QT
PostPosted: Wed Jan 30, 2019 10:48 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jun 25, 2014 5:25 pm
Posts: 359
Location: Germany
gtk2:
Image

gtk3:
Image

qt:
Image

_________________
Image
Why OpenSource should have a license
PureBasic-CodeArchiv-Rebirth: Git-Repository / Download -- Any help is welcome!
Manjaro Xfce x64 (Main system) :: WindowsXP/Xubuntu x86 (VirtualBox) :: PureBasic (Linux: x86/x64, Windows: x86) :: All are up to date


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeImage(..., #PB_Image_Smooth) corrupts image on QT
PostPosted: Mon Feb 18, 2019 10:14 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13612
Location: France
Fixed.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye