jeudi 28 avril 2016

CoreData multiple (500) small images vs PNG files

Coredata on iOS is typically using SQLite so I am assuming it may do some basic compression (but maybe not). I have over 500 PNG files which Photoshop saves at about 30kb each and tinyPNG.com can compress to about 6-7kb. The images are linked to other database fields in a coredata persistent store.

I'd like my iOS App to be as small as possible but I would also like to have a method to easily change the images in the form of a Desktop App that supports drag and drop image files.

My question is what the file size might roughly be for these storage scenarios: 1. Import all PNGs as files into Xcode.(assuming this will be 6-7kb per file). I will then populate the database with the file name. This is my least preferred method as it is error prone but if there are significant file savings I might go with it. 2. Import all PNGs into coredata as images. I believe the PNG to uiimage may increase the file size but not sure. 3. Use desktop app to drag and drop PNG into record and save as SQLite coredata store. I think this might increase the size but not sure. This is my preferred method. 4. Other method?

Does anyone have an idea how PNG files are stored and how efficient the compression is in a UIImage?

Thanks

Greg

Aucun commentaire:

Enregistrer un commentaire