Jump to content


Photo

sprite_save Issues


  • Please log in to reply
8 replies to this topic

#1 JRA

JRA

    GMC Member

  • GMC Member
  • 44 posts
  • Version:GM:Studio

Posted 20 August 2012 - 06:14 PM

Fixed 1.1.525 and later...

sprite_save() failed - no bitmap data available Has anyone else been getting this error?

The sprite exists, beforehand, so I do not think that is the source of the fail.

I've also seen another major error:
I have been able to save sprites added from the Internet (e.g. https://www.google.c...srpr/logo3w.png ) but the colors are messed up!

Here is an original image, from the web:

Posted Image

And this is the image after downloading it through GM:Studio's Asynchronous functions and sprite_save()ing it:

Posted Image

This switches the image's red and blue values for each pixel.

Edited by JRA, 12 October 2012 - 08:56 PM.

  • 0

#2 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 2957 posts
  • Version:GM:Studio

Posted 21 August 2012 - 02:24 AM

Is that the same url you are using on GM:S? if so, have you tried a different server? if not, and can we see the real link?
  • 0

#3 JRA

JRA

    GMC Member

  • GMC Member
  • 44 posts
  • Version:GM:Studio

Posted 21 August 2012 - 02:33 AM

Is that the same url you are using on GM:S? if so, have you tried a different server? if not, and can we see the real link?


The picture in the nephalia seakite example is located at:

http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=247126&type=card

Changing the multiverseid allowed me to download different magic cards. Unfortunately, gmc cannot handle images processed this way, so I uploaded it to tinypic. The second image is the output of sprite_save.

It seems as if the blue (r,g,B) of the sprite is inverted. I will have to look into this further.

Edited by JRA, 21 August 2012 - 02:35 AM.

  • 0

#4 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 2957 posts
  • Version:GM:Studio

Posted 21 August 2012 - 02:43 AM

Ok, this works:
sprite_index = sprite_add( 'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=247126&type=card' , 0, 0, 0, 0, 0);

But using sprite_save() I have no idea where the file went to.. or even if its beign downloaded at all, so cant help there.. mind sharing the code?
  • 0

#5 JRA

JRA

    GMC Member

  • GMC Member
  • 44 posts
  • Version:GM:Studio

Posted 21 August 2012 - 03:09 AM

Ok, this works:

sprite_index = sprite_add( 'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=247126&type=card' , 0, 0, 0, 0, 0);

But using sprite_save() I have no idea where the file went to.. or even if its beign downloaded at all, so cant help there.. mind sharing the code?


I'm currently away from my computer:

GM:S now supports asynchronous functions, such as downloading data on all devices. Learn about them here:

http://gmc.yoyogames.com/index.php?showtopic=533980&view=&hl=&fromsearch=1

And it's sprite_save(ind,subimg,fname)

I'll have my project to refer to tomorrow.
  • 0

#6 Chessmasterriley

Chessmasterriley

    Creative Concentrate

  • GMC Member
  • 1789 posts
  • Version:GM:Studio

Posted 23 August 2012 - 07:34 PM

I am getting the color flipping error as well. And this is from an internally stored image. What the heck GM:S?

My sprite is changing from skin color-->blue skin. This is bugging me...
  • 0

#7 JRA

JRA

    GMC Member

  • GMC Member
  • 44 posts
  • Version:GM:Studio

Posted 24 August 2012 - 08:56 PM

I am getting the color flipping error as well. And this is from an internally stored image. What the heck GM:S?

My sprite is changing from skin color-->blue skin. This is bugging me...


I have found out that this switches the image's red and blue values for each pixel [Confirmed]. I've also submitted a bug report.
  • 0

#8 TeamSteeve

TeamSteeve

    GMC Member

  • GMC Member
  • 921 posts
  • Version:GM:Studio

Posted 06 October 2012 - 11:57 PM

Just came across this problem myself. I can't believe it hasn't been fixed yet.

There are some really old issues in the bug-tracker and YoYo Games seems to be addressing the newer ones, as if the old ones don't matter any more.
Grrrrr! If they don't want people to submit multiple issues on the same thing, they should at least close the old ones.

Come on YoYo guys, don't ignore us please.

Edited by TeamSteeve, 06 October 2012 - 11:57 PM.

  • 0

#9 JRA

JRA

    GMC Member

  • GMC Member
  • 44 posts
  • Version:GM:Studio

Posted 09 October 2012 - 11:15 AM

I agree, I posted the bug almost a month ago, and about a week ago it was moved to "assigned". As for Mac images, they fixed the game crashing when downloading pngs.

EDIT (10/12/12): Got a notice from the YoYo Bug Tracker saying that it will be fixed : "v >= 1.1.525".

Edited by JRA, 12 October 2012 - 08:54 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users