Recent

Author Topic: Canvas.StretchDraw and AntialiasingMode  (Read 9983 times)

VTwin

  • Hero Member
  • *****
  • Posts: 916
  • Former Turbo Pascal 3 user
Canvas.StretchDraw and AntialiasingMode
« on: March 29, 2011, 03:54:02 pm »
The Canvas.StretchDraw method works fine for resizing, but the image quality can be poor when shrinking an image.

Is AntialiasingMode supposed to help? It does not seem to do anything in Carbon. Any suggestions on ways to get a better image?

ImageMagick may be overkill, and it doesn't seem to be quite OS X ready.

Any comments appreciated.

Cheers,
Frederick

OS X 10.6.6
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.8 (64 bit Cocoa, also fixes and trunk)
Ubuntu 18.04.3: Lazarus 2.0.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.8 (64 bit on VBox)

PAEz

  • New Member
  • *
  • Posts: 29
Lazarus 0.9.29  Windows XP sp3
E6400 2gig ram 7900GTX 512meg

I have a shocking memory and am a crap coder, so take everything I say with a grain of doubt

gyts

  • Jr. Member
  • **
  • Posts: 96
Re: Canvas.StretchDraw and AntialiasingMode
« Reply #2 on: March 30, 2011, 03:41:07 pm »
http://wiki.lazarus.freepascal.org/BGRABitmap.

How to install BGRABitmap? Do I need bgrabitmap folder put into Lazarus\components?
« Last Edit: March 30, 2011, 07:50:46 pm by Marc »

PAEz

  • New Member
  • *
  • Posts: 29
Re: Canvas.StretchDraw and AntialiasingMode
« Reply #3 on: March 30, 2011, 04:30:31 pm »
Have a look at the tutorial, thats covered on the first page...
http://wiki.lazarus.freepascal.org/BGRABitmap_tutorial
..and for me the directory for bgra is in the same directory as the source for the app.
Lazarus 0.9.29  Windows XP sp3
E6400 2gig ram 7900GTX 512meg

I have a shocking memory and am a crap coder, so take everything I say with a grain of doubt

circular

  • Hero Member
  • *****
  • Posts: 3405
    • Personal webpage
Re: Canvas.StretchDraw and AntialiasingMode
« Reply #4 on: March 30, 2011, 10:14:00 pm »
I've updated BGRABitmap, it should now also work as an installed package. It still works of course when simply added to the search path.
Conscience is the debugger of the mind

VTwin

  • Hero Member
  • *****
  • Posts: 916
  • Former Turbo Pascal 3 user
Re: Canvas.StretchDraw and AntialiasingMode
« Reply #5 on: March 31, 2011, 02:16:48 pm »
Excellent. I will give this a try.

It looks really great circular!

Thank you,
Frederick
« Last Edit: March 31, 2011, 02:32:52 pm by Frederick »
“Talk is cheap. Show me the code.” -Linus Torvalds

macOS 10.13.6: Lazarus 2.0.8 (64 bit Cocoa, also fixes and trunk)
Ubuntu 18.04.3: Lazarus 2.0.8 (64 bit on VBox)
Windows 7 Pro SP1: Lazarus 2.0.8 (64 bit on VBox)

circular

  • Hero Member
  • *****
  • Posts: 3405
    • Personal webpage
Re: Canvas.StretchDraw and AntialiasingMode
« Reply #6 on: March 31, 2011, 06:50:53 pm »
You're welcome.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018