Hi All
I have a PNG image, which I have backdropped it on the canvas. The resolution of the image looks good on mac, but on the Linux the resolution is very bad. I have attached the screenshots below.
Can you please let me know , how can the resolution be increased on the linux machine?
DaveS
(DaveS)
June 30, 2017, 3:58pm
2
please post the code you are using to display this image,
Hi Dave
Below is the code I used for displaying:
Dim name As String = “page-”+Str(pagenumber,“000000”)+".png"
Dim preview As FolderItem = Self.PreviewPath.Child(name)
Self.originalPict = Picture.Open(preview)
//Draw the picture into the canvas
Dim PreviewPict As New Picture(self.cvsClipPreview.Width,self.cvsClipPreview.Height,32)
PreviewPict.Graphics.DrawPicture(Self.originalPict,0,0,self.cvsClipPreview.Width,self.cvsClipPreview.Height,0,0,self.originalPict.Width,self.originalPict.Height)
Self.cvsClipPreview.Backdrop = PreviewPict
Between your screenshot and your code, it looks like Linux is just as bad as Windows used to be at scaling (it’s not easy).
Have a look at https://forum.xojo.com/34206-resize-images-gocomics-uses-xojo/ where I posted some code for bilinear interpolation. This should also work on Linux.