Recent

Author Topic: Stretchdraw blurrs image  (Read 8816 times)

alanphys

  • Jr. Member
  • **
  • Posts: 56
Stretchdraw blurrs image
« on: October 28, 2005, 09:59:14 am »
I'm busy porting an imaging application from Delphi to Lazarus. The application uses StretchDraw to draw a bitmap image on a TImage component at twice its resolution. In Delphi the displayed image is nice and sharp but in lazarus it is fuzzy. On inspection it seems that the image drawing algorithm in Lazarus is interpolating the pixels on the displayed image from the original bitmap.

Is there anywhere I can switch the interpolation off? Setting CopyMode does not help.

Where can I find the bitmap drawing code. I've tried tracing through the code, but StretchDraw call the OnPaint event and the OnPaint event calls StretchDraw.

I'm using Lazarus 0.98, fpc 2.0 on Fedora Core 2

Any advice will be welcome

Thanks
Alanphys
Alanphys
Fedora 34 + KDE/QT5, Tinycore 8, Windows XP-10
https://github.com/alanphys

alanphys

  • Jr. Member
  • **
  • Posts: 56
RE: Stretchdraw blurrs image
« Reply #1 on: November 11, 2005, 10:16:15 am »
OK I transferred everything over to Windows and recompiled. StretchDraw behaves correctly and displays a nice pixilated image when I resample the original bitmap to a lower resolution. It seems the above problem is due to gtk. I will post a message on one of their forums and see if I get any joy.

Cheers
Alanphys
Alanphys
Fedora 34 + KDE/QT5, Tinycore 8, Windows XP-10
https://github.com/alanphys

Anonymous

  • Guest
RE: Stretchdraw blurrs image
« Reply #2 on: November 13, 2005, 04:50:43 pm »
Hello,
can you give me your Lazarus modified please ?

my mail : skapman2@hotmail.com

Thank you

alanphys

  • Jr. Member
  • **
  • Posts: 56
RE: Stretchdraw blurrs image
« Reply #3 on: November 14, 2005, 07:37:24 am »
I didn't modify Lazarus. I have a dual boot system with Fedora Core 2 and Windows XP. I do most of my developing in FC2 but my clients use Windows. I have Lazarus 0.98 installed on both FC2 and Windows (will install 9.10 as soon as I get a break). When I want to publish a project to Windows I copy the project to a disk readable by windows and reboot into Windows, start Lazarus and compile. There is documentation on cross compiling to Windows from Linux, but I find this method easier as I can immediately test the program and make sure it is running correctly under Windows.

Cheers
Alanphys
Alanphys
Fedora 34 + KDE/QT5, Tinycore 8, Windows XP-10
https://github.com/alanphys

alanphys

  • Jr. Member
  • **
  • Posts: 56
RE: Stretchdraw blurrs image
« Reply #4 on: October 10, 2006, 02:56:57 pm »
Alanphys
Fedora 34 + KDE/QT5, Tinycore 8, Windows XP-10
https://github.com/alanphys

 

TinyPortal © 2005-2018