1. Anders Ruud
  2. love
  3. Issues

Issues

Issue #608 resolved

Is ImageData:getString still necessary?

hahawoo
created an issue

If you want to save ImageData to a file, there is ImageData:encode, and if you want to get the pixel data of ImageData, there is ImageData:getPixel.

It's a pretty difficult method to understand, and at least I can't think of any practical uses which would need the speed benefit over using getPixel, so perhaps it should be removed?

Comments (3)

  1. Alex Szpakowski

    imagedata:getString() is very fast, compared to alternatives. It might have limited use (although there are still a few I can think of), but It's easier to keep it than to remove it. :)

  2. hahawoo reporter

    Hehehe, I thought it might be! :D

    I guess it was one of those methods I had a bit of trouble wrapping my head around, and I wasn't sure of its history either, I thought maybe it was something left over from before encode existed.

    It could be used for saving images in a different format maybe... or sending it over a network... I'm sure there are more, but I was also wondering if in those cases you even needed the speed. But if it's waaay faster, and there are uses for it, then I guess it can stay. :P

    Still, I'd be interested to know of any other practical uses for ImageData. And keeping them in mind, why is there no SoundData:getString?

  3. Log in to comment