Hey guys,
i wanna compress images into small sizes…i have too many pics in my app…how can i compress it without losing quality of image
Hey guys,
i wanna compress images into small sizes…i have too many pics in my app…how can i compress it without losing quality of image
does that work for compressing images??? im talking about images…not sprite sheets
If you are try to make images smaller (pixel wise) you should be able to use preview on Mac (build in) or this if your on Windows https://imageresizer.codeplex.com/
There aren’t too many way magic way of making a image not look worse and decease size. You can make a png to jpeg (just look for online converter) which will make the images way smaller, but will remove any alpha or transparency. You can use Sprite sheets which puts all your photos into just a few photos which can make project sizes much smaller.
If you use display.newImageRect like you should all images should be the same size as size you write in your code. for example:
display.newImageRect(“image.png”, 50,50)
The your photos resolution should be 50x50
This does not factor in dynamic image selection which you might need to figure out by reading this here(https://docs.coronalabs.com/daily/guide/basics/configSettings/index.html#dynamicimages)
I’ve found TinyPNG to be super useful in some situations.
PS - re: multiple image sizes (@2x, @3x, etc.) - I generally don’t do this when trying to conserve space. Instead I:
Then, I may additionally use TinyPNG to further compress some images (be sure to keep a copy of your original PNGs because once you put them through TinyPNG they won’t be editable).
-Ed
does that work for compressing images??? im talking about images…not sprite sheets
If you are try to make images smaller (pixel wise) you should be able to use preview on Mac (build in) or this if your on Windows https://imageresizer.codeplex.com/
There aren’t too many way magic way of making a image not look worse and decease size. You can make a png to jpeg (just look for online converter) which will make the images way smaller, but will remove any alpha or transparency. You can use Sprite sheets which puts all your photos into just a few photos which can make project sizes much smaller.
If you use display.newImageRect like you should all images should be the same size as size you write in your code. for example:
display.newImageRect(“image.png”, 50,50)
The your photos resolution should be 50x50
This does not factor in dynamic image selection which you might need to figure out by reading this here(https://docs.coronalabs.com/daily/guide/basics/configSettings/index.html#dynamicimages)
I’ve found TinyPNG to be super useful in some situations.
PS - re: multiple image sizes (@2x, @3x, etc.) - I generally don’t do this when trying to conserve space. Instead I:
Then, I may additionally use TinyPNG to further compress some images (be sure to keep a copy of your original PNGs because once you put them through TinyPNG they won’t be editable).
-Ed