I would like to use something like PolyVector to resize/reshape sprites without getting the blur effect that otherwise smoothes the sprite/bitmap out on my machine. As a crude example, take this code to resize a sprite "Checker.Png":
main:
LOADSPRITE "Checker.png", 1
ResizeSprite(1, 2, 512, 512)
SAVESPRITE "Blurry.png",2
END
// ------------------------------------------------------------- //
// --- RESIZESPRITE ---
// ------------------------------------------------------------- //
FUNCTION ResizeSprite: SourceSprite%, TargetSprite%, destWidth%, destHeight%
// Uses "virtual screen" 0
// These values are defined LOCAL:
// SourceSprite%, TargetSprite%, Width%, Height%
LOCAL spritewidth%, spriteheight%
GETSPRITESIZE SourceSprite%, spritewidth%, spriteheight%
CREATESCREEN 0, TargetSprite%, destWidth%, destHeight% // create temporary workscreen of desired resolution
USESCREEN 0
//Copy sprite #0 to target sprite and stretch to fit
STARTPOLY SourceSprite% // Bitmap = No.SourceSprite%
POLYVECTOR 0, 0, 0, 0, RGB(255, 255, 255) // top left
POLYVECTOR 0, destHeight%-1, 0, spriteheight%-1, RGB (255, 255, 255) // bottom left
POLYVECTOR destWidth%-1, destHeight%-1, spritewidth%-1, spriteheight%-1, RGB(255, 255, 255) // bottom right
POLYVECTOR destWidth%-1, 0, spritewidth%-1, 0, RGB( 255, 255, 255) // top right
ENDPOLY
USESCREEN -1 // switch back to main screen
LOADSPRITE "", SourceSprite% // empty source sprite/release memory/resources
ENDFUNCTION // RESIZESPRITE
As you can see from the attached images, the result is slightly blurry - scaling up by more increases the blur factor quite a lot. I beleive this is the cause of some tiling issues in other posts lately.
I'm pretty confident that for just resizing a rectangular area there must be a simple solution, but I'd really like to use PolyVector simply because I relaly REALLY want to be able to resize/reshape random triangles. Any bright ideas? Is there a "set sharpness" function I can use somewhere to effectively turn blurring off?
[attachment deleted by admin]