I’m attempting to scale down photos to smaller previews, and pretty much every technique I’ve used results in jagged edges that look horrible. I’ve tried:
Simply drawing the new picture using the ppx.Graphics.DrawPicture(p,0,0,newW,newH,0,0,p.Width,p.Height) method
MBS plugin ScalingMBS (using all of the different options)
Photoshop uses bicubic resampling apparently and this must make a huge difference. Notice the difference between the two images below:
Honestly struggling to tell which one you think is better and which was produced by each of the two methods.
maybe its the size, maybe its my eyes…
Does anyone expect a preview to be photo-glorious?
[quote=475481:@Jeff Tullin]Honestly struggling to tell which one you think is better and which was produced by each of the two methods.
maybe its the size, maybe its my eyes…
Does anyone expect a preview to be photo-glorious?[/quote]
Look at the hair, as well as the outline of the blue hoodie, it’s much more pixellated and jagged in the top image (created using the app) vs the bottom image (created using Photoshop).
Are you resizing it into a picture then resizing the picture again because it looks fine here on windows. It might be a mac thing, what version of macos and xojo are you using?
no problem at xojo2019r31, there are no ugly hard edges.
did you overwrite AntiAlias in graphics card driver?
as i understood there is direct draw between at windows.
i dropped your example picture into a project and then use a canvas to paint, direct and indirect
in canvas i set all 4 anchor for testing it with window resize.
[code]Sub Paint(g As Graphics, areas() As REALbasic.Rect) Handles Paint
Var pic As New Picture(256,512) 'just for test should have minimum the size of canvas or it get blurry
pic.Graphics.AntiAliasMode = Global.Graphics.AntiAliasModes.HighQuality
pic.Graphics.DrawPicture(TestAntiAliasMode,0,0,pic.Graphics.Width,pic.Graphics.Height,0,0,TestAntiAliasMode.Width,TestAntiAliasMode.Height)
Hello,
in canvas, pictures can be drawn well if they were previously
converted into a pixmap shape
Var px As pixmapshape
px = New pixmapshape(pix2)
rem Draw smaller or larger in canvas with a mousewheel
big As Double
big= px.scale + deltay/30
px.scale = big
// mousedown:
Picture.Graphics.DrawObject px,x,y
//Paint:
g.drawobject px,posx,posy
rem or rotate
rem With a timer you can also let the Pic2 turn automatically
Var rotatingwheel As Double
rotatingwheel = CDbl(angulardegrees.Text)+deltay
If Abs(rotatingwheel) > 360 Then rotatingwheel=0
angulardegrees.value = rotatingwheel.ToString
If px <> Nil Then
px.rotation=rotatingwheel / 57.29577951311
Canvas1.Invalidate(False)// Paint:
End If