Scale 2,2 of image (glfw) without blurred pixels

Monkey Forums/Monkey Beginners/Scale 2,2 of image (glfw) without blurred pixels

Boulderdash(Posted 2014) [#1]
I need to scale an image by 2 but I don't want blurry pixels, is there anyway of doing that ?


Nobuyuki(Posted 2014) [#2]
#MOJO_IMAGE_FILTERING_ENABLED=False



therevills(Posted 2014) [#3]
What Nobuyuki said... also it doesn't work 100% on different browsers for the HTML5 target.


Boulderdash(Posted 2014) [#4]
Im not refering to Mojo, im refering the GLFW Target ie: Windows And OSX executables

GlfwGame.GetGlfwGame().SetGlfwWindow( 640,480,8,8,8,0,0,0,False )

I want an old school chunky pixel effect, that actual image is 320 x 240 scaled 2 x 2 to the 640 x 480
but the blurry image hurts my eyes and looks real bad.

I can get rid of the fuzz by doubling the size of the image and not scaling it but then the CPU load jumps to 100%

Seems to indicate img.WritePixels is not very efficent, since I can do the same thing in X86 assembler with 2% CPU load.

So really im just asking if there is a flag somewhere to turn off the image smoothing.

Your answer is very close , but im not very familiar with my Monkey friend so I will have to look around to find the file that contains the settings you have already mentioned. Maybe if I feed it another Banana ?


therevills(Posted 2014) [#5]
I think you are confusing your terms, Mojo isn't a target it's a framework which is used for Monkey's targets to create 2D games. One of the targets which is supported by Mojo is GLFW (the Desktop target).


Boulderdash(Posted 2014) [#6]
Thanks therevills you are correct, I was confused,

I managed to find the config file and change the suggested line, now the blurring is gone,

Thanks for the help, its displaying as I want it to now


Salmakis(Posted 2014) [#7]
Just for info:
You can put any config line just into your .monkey file.
Just add this line there onto the top of your main monkey file of your project and the config will be overwritten from the config.monkey file.
So you dont need to search through and edit the config files, this should work with all settings from config and templates wich are made with this # thingy.