This has been reported before, but not including code to specifically demonstrate the problem. It's an error in the way that GRAPHIC STRETCH does it's thing.
Trying %halftone, etc, doesn't correct the error. The image created via GRAPHIC STRETCH looks wrong. Just wrong.
The below code demonstrates the problem side-by-side, though it's rather primitive (it works with a 2366x2366 pixel test bitmap - all I needed). And yes, I've tried with other bitmaps.
Trying %halftone, etc, doesn't correct the error. The image created via GRAPHIC STRETCH looks wrong. Just wrong.
The below code demonstrates the problem side-by-side, though it's rather primitive (it works with a 2366x2366 pixel test bitmap - all I needed). And yes, I've tried with other bitmaps.
Code:
#COMPILE EXE #INCLUDE "win32api.inc" FUNCTION PBMAIN () AS LONG ' the original size of my test bmp is 2366x2366, and it is a photographic image. ' sample code doesn't respect aspect ratio, it's just built around my square ' test image which is 2366x2366, but feel free to try other images. The effect is most noticeable on photographic images. ' lets load up our original bitmap (mine is 2366x2366 px) file$ = "g.bmp" 'make a lil graphic window for lookin' at on the left side of screen GRAPHIC WINDOW "Graphic Render", 100,100,400,400 TO hGraphic1& GRAPHIC ATTACH hGraphic1&,0 'render the big graphic into the lil window using GRAPHIC RENDER GRAPHIC RENDER file$,(0,0)-(399,399) 'make a 2nd lil graphic window for lookin' at off there to the right GRAPHIC WINDOW "Graphic Stretch",550,100,400,400 TO hGraphic2& GRAPHIC ATTACH hGraphic2&,0 'render the big graphic into the lil window using GRAPHIC STRETCH GRAPHIC BITMAP LOAD file$, 2366, 2366 TO hBig& 'first, load the big file to have something to copy from GRAPHIC STRETCH hBig&,0, (0,0)-(2365,2365) TO (0,0)-(399,399) MSGBOX "The left window uses GRAPHIC RENDER, and looks perfect."+$CRLF+$CRLF _ +"Note how the right window looks using GRAPHIC STRETCH. You will find that using %HALFTONE, etc., does not cure the problem. While there are other techiniques (outside of DDT) for stretching, the command should work." END FUNCTION
Comment