This object is in archive! 

Gemf image types

Bill Chadwick shared this question 6 years ago
Answered

I have tried a Gemf archive of Webp format tiles but it won' load. The Gemf spec does not mandate any tile image type. Can we please be told what image formats are supported by Locus for a Gemf archive? Do all the tiles / zoom levels in an archive have to use the same image format? Android should be able to decode an image from a byte stream in unknown format.


Thanjs

Replies (4)

photo
1

Hi Bill,

Locus can display only GEMFs with tiles in PNG or JPEG formats. WEBP would require adding a special library to the app which would be, considering the demand of this format, not cost/data storage effective. Thanks for reporting, we've added the information to Locus user guide.

photo
1

Hm, Are you sure WebP won't work?

WebP support is built in to Android - https://developer.android.com/guide/topics/media/media-formats.html

See also https://developer.android.com/reference/android/graphics/BitmapFactory.html which is able to construct a Bitmap from a byte stream or byte array.

The GEMF format is image type independent (Spec author concurs). In fact a Gemf archive of mixed image types should be practical.

photo
1

Actually,

My second attempt with a Gemf of webP works!

I think there was something wrong with the gemf creation on my first attempt.

WebP will often make for the smallest possible archives.

photo
1

Hi Bill,

I thought you have Android older than 5+ when you wrote WebP in GEMF didin't work - as such it needs the additional library. And yes, WebP is supported in newer Androids. Glad it works for you!

Replies have been locked on this page!