Saved images

When saving an image does codea save it as a vector sprite/image or a standard image because I noticed in the reference the use of width and height on readImage(img,width,height) only applys to vector images but when using this function with a codea saved image it seems to do nothing, any ideas?

Once in memory, an image is a memory bloc (origin is lost). Then it saves this memory bloc as a png file.

So how come I can’t load it as sized? I understand png is raster but shouldn’t there be a way to not load certain pixels to make the image faster to load because if I load or create two many full size images then codea crashes but I only need images size 125x125

Not sure what is going on exactly.
But if you can load one image ok then:

  • sprite it into a 125x125 image with set context and scale.
  • delete the original image in memory (= nil).
  • collectgarbage().
    With this you should not crash

That’s not what I want to do, either way ill have to read the full size image because its not a vector image, is there any chance codea will have a save vector image function?

@Luatee - one way to reduce memory usage is to read in each full size image, create an empty image the (smaller) size you want, then setContext and sprite to that small image, then get rid of the original image. A bit messy but you only have to do it once in setup.

That’s what I have, it seems stable so its ready for release when I get an iMac and a dev license, seems far away!