I'm creating a SQLite Tilecache via the WebMapTiler, with PNG blobs, and would like to use PNG Optimization. This seems to be available in the PNGRaster writer, but I'm not using the PNGraster writer, I'm using the SQLite writer. So, is there any way I can pull that piece of code or is there another transformer I could use to do the same job of PNG Optimization?
PNG Optimization
Best answer by daveatsafe
Hi @erinjayaustin,
If you are using the RasterExtractor to create the PNG blobs for SQLite, you can replace it with a combination of a FeatureWriter (to write out a PNG) and an AttributeFileReader (to read the PNG back into a blob attribute). This will allow you to control the optimization of the PNG files.
To avoid creating a lot of PNG files on your drive, you can reuse the same name for all the tiles (ie. temp.png). You can also use the TempPathnameCreator to create a temporary folder for your PNGs that will be automatically cleaned up when the workspace finishes.
This is essentially the same process the RasterExtractor uses, so it shouldn't affect the workspace performance at all.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.