Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Pixel perfect scaling of images?

Author
Message
Kakise
AGK Tool Maker
7
Years of Service
User Offline
Joined: 25th May 2016
Location: Paris
Posted: 8th Mar 2019 22:25
Hello everyone

I have a pixel art image that I generate on each run and I need to rescale it. However, the included ResizeImage() and SetSpriteScale() functon only use a nearest neighbor scaling method. How can I resize my sprites/images in a pixel perfect manner? I tried doing it myself using memblocks but I couldn't figure out how.

Thank you.
PCG Lover
Using AppGameKit Tier 1&2

My creations:

[Tier 1 PLUGIN] Wave Function Collapse for Tier 1

The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Mar 2019 22:37 Edited at: 8th Mar 2019 22:38
This post has been marked by the post author as the answer.
SetDefaultMinFilter(0)
SetDefaultMagFilter(0)

You can also set it on an image basis using SetImageMagFilter( iImageIndex, mode ) SetImageMinFilter( iImageIndex, mode )
Kakise
AGK Tool Maker
7
Years of Service
User Offline
Joined: 25th May 2016
Location: Paris
Posted: 9th Mar 2019 20:47
Thank you very much, didn't know about this command, it was exactly what I was looking for.
PCG Lover
Using AppGameKit Tier 1&2

My creations:

[Tier 1 PLUGIN] Wave Function Collapse for Tier 1

Login to post a reply

Server time is: 2024-04-16 06:21:30
Your offset time is: 2024-04-16 06:21:30