Save Image Anti Alias option

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Save Image Anti Alias option

Post by IdeasVacuum »

SaveImage(#MyImage, sMyFile, #PB_ImagePlugin_PNG | #PB_AntiAlias)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Save Image Anti Alias option

Post by eesau »

What would it do exactly?
User avatar
luis
Addict
Addict
Posts: 3895
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Save Image Anti Alias option

Post by luis »

Usually antialiasing makes sense with computer generated geometry, from a working higher resolution to a targeted lower one (supersampling), or in a more ample sense when you want an image to be merged with a background and want its borders to be filtered in some way against the adjacent pixels (not really antialiasing though).
But I don't see what can be done with a generic, static bitmap since there is not a rasterization phase involved.
"Have you tried turning it off and on again ?"
A little PureBasic review
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Save Image Anti Alias option

Post by IdeasVacuum »

For me, it's to do with graphics dynamically drawn on a CanvasGadget. Since the drawing is dynamic, the AlphaBlend mode cannot be used, though I'm looking at a couple of alternatives, with re-drawing the graphic on mouse-up being a possibility.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: Save Image Anti Alias option

Post by Kukulkan »

I think it is impossible of this stage (saving). IMHO anti-aliasing must happen while drawing because then the geometry is known. On saving a bitmap it can only be some blurring which will reduce sharpness but not a real anti-aliasing.

Am I wrong?

Kukulkan
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Save Image Anti Alias option

Post by netmaestro »

I don't believe SaveImage() is the appropriate stage for it, however if you're saving as 8bit you could see what the #PB_Image_FloydSteinberg flag does for you, it may help quite a bit.
BERESHEIT
Post Reply