I use this small program to test:
Code: Select all
; Used with PB 5.42 LTS
Procedure test()
CompilerIf #PB_Compiler_OS = #PB_OS_Windows
Protected Path.s = "c:\temp\"
CompilerElseIf #PB_Compiler_OS = #PB_OS_Linux
Protected Path.s = "/tmp/"
CompilerEndIf
Protected img.i = CreateImage(#PB_Any, 200, 200,
32, #PB_Image_Transparent)
StartDrawing(ImageOutput(img.i))
DrawingMode(#PB_2DDrawing_AlphaBlend)
Circle(100,100,90, RGBA(200,200,200,255))
StopDrawing()
UsePNGImageEncoder()
SaveImage(img.i, Path.s + "circlePre.png", #PB_ImagePlugin_PNG)
ResizeImage(img.i, 100, 100, #PB_Image_Smooth); or use 20, 20 to see more better
SaveImage(img.i, Path.s + "circlePost.png", #PB_ImagePlugin_PNG)
EndProcedure
test()


As you can see, the Windows version got a darker "line" around the circle. It looks like the resize algorithm assumed a dark background instead of a transparent one. On Linux, the result is like expected. How can I get rid of that surrounding darker line on Windows?
If you want to see the effect more drastically, simply resize to 20x20 pixels instead of 100x100. The result is annoying...
Best,
Kukulkan