Okay,
So I'm new to these forums...
What I'm trying to do is make an image editor. It works by using 1024 (32x32) objects. It runs fast and has pen, flood-fill, line, circle, rectangle and swap tools. You can also rotate and flip your image. You can also save your image. However, I'm having some trouble loading an image into it. I have tried replacing and adding sprites then using surface_getpixel, but it has always resulted in a black canvas. Any help would be appreciated.
The gmk file can be downloaded here:
http://www.mediafire.com/download.php?1hs8o1v0dnrde2m
My current codes for loading:
//in load object executed for itself
{
name=get_string("Load Image: (.pngs only!!!)",-1);
}
//in load object executed for itself
if (name != "")
then
{
if (file_exists(name+".png"))
then
{
sprite_replace(spr_test009,working_directory+name+".png\",0,0,0,0,0);
surf=surface_create(32,32);
surface_set_target(surf);
draw_sprite_stretched(spr_test009,0,0,0,32,32);
surface_reset_target();
}
}
//in load object executed for all obj_white_pixels
if ((obj_com_load).name != "")
then
{
if (file_exists((obj_com_load).name+".png"))
then
{
color=surface_getpixel((obj_com_load).surf,x/32,y/32);
}
}
Edited by thespriteguy, 11 March 2012 - 09:56 PM.











