Image generation rules
By default, all images from the library that are used in a scene are generated in the img
folder.
Bitmap properties
Adobe Animate loads all images in the document and makes it possible to change the compression of the images through the properties panel.
The bitmap properties contain the source of the image, its id, and its compression information.
There are 2 compression options:
- Photo(JPEG)
- Lossless(PNG/GIF)
The Prysm exporter takes into account the source file type, the image id, and the compression type when generating images.
Compression
The compression type defines the image file type. Photo compression creates .jpg
and .jpeg
files and Lossless creates .png
files.
Due to a problem with the Adobe Animate Plugin API, only images with a .jpg
or .jpeg
source file can be exported as .jpg
and .jpeg
files.
Compression quality
The Prysm exporter always generates images with the quality of the imported image due to a problem with the Adobe Animate Plugin API. Therefore, the Allow smoothing
, Enable deblocking
, and Quality
are ignored.
Bitmap id
The bitmap id is the name of the generated image file. The library folder structure is preserved, so the following table illustrates the path of the generated files.
Library path | Generated path |
---|---|
./image.png | ./root/img/image.png |
./folder/image.png | ./root/img/folder/image.png |
By default, when an image file is imported in the document it contains its type in its id, however, users can remove it and the document will still be valid.
To support this behavior, the exporter appends the type of the image(defined by the compression) to the generated file. Since the straight case is to have the image type in its id on import, the exporter doesn't append the type of the file when it is in its id, and the compression and source match.
Library path | Compression | Source file type | Generated file |
---|---|---|---|
file.png | Lossless | file.png | file.png |
file.jpg | Lossless | file.jpg | file.jpg.png |
file.bmp | Lossless | file.bmp | file.bmp.png |
file.jpeg | Lossless | file.jpeg | file.jpeg.png |
file.gif | Lossless | file.gif | file.gif.png |
file.dib | Lossless | file.dib | file.dib.png |
file.png | Photo | file.png | file.png |
file.jpg | Photo | file.jpg | file.jpg |
file.bmp | Photo | file.bmp | file.bmp.png |
file.jpeg | Photo | file.jpeg | file.jpeg |
file.gif | Photo | file.gif | file.gif.png |
file.dib | Photo | file.dib | file.dib.png |
file | Lossless | file.png | file.png |
file | Lossless | file.jpg | file.png |
file | Lossless | file.bmp | file.png |
file | Lossless | file.jpeg | file.png |
file | Lossless | file.gif | file.png |
file | Lossless | file.dib | file.png |
file | Photo | file.png | file.png |
file | Photo | file.jpg | file.jpg |
file | Photo | file.bmp | file.png |
file | Photo | file.jpeg | file.jpg |
file | Photo | file.gif | file.png |
file | Photo | file.dib | file.png |
Naming collisions
When two filenames collide the second image file encountered while exporting will have its content as a hash appended to its name.
Library path | Compression | Source file type | Encountered | Generated file |
---|---|---|---|---|
file.png | Lossless | file.png | 1 | file.png |
file | Lossless | file.png | 2 | file |
Library path | Compression | Source file type | Encountered | Generated file |
---|---|---|---|---|
file.png | Lossless | file.png | 2 | file |
file | Lossless | file.png | 1 | file.png |
Premultiply alpha
The exporter has the option to generate .tga
files with the image alpha premultiplied. All bitmap library items that generate a .png
generate a .tga
instead. All images that generate a .jpg
or .jpeg
remain the same.
The table describes the results when premultiplied alpha is enabled.
Library path | Compression | Source file type | Generated file |
---|---|---|---|
file.png | Lossless | file.png | file.tga |
file.jpg | Lossless | file.jpg | file.jpg.tga |
file.bmp | Lossless | file.bmp | file.bmp.tga |
file.jpeg | Lossless | file.jpeg | file.jpeg.tga |
file.gif | Lossless | file.gif | file.gif.tga |
file.dib | Lossless | file.dib | file.dib.tga |
file.png | Photo | file.png | file.tga |
file.jpg | Photo | file.jpg | file.jpg |
file.bmp | Photo | file.bmp | file.bmp.tga |
file.jpeg | Photo | file.jpeg | file.jpeg |
file.gif | Photo | file.gif | file.gif.tga |
file.dib | Photo | file.dib | file.dib.tga |
file | Lossless | file.png | file.tga |
file | Lossless | file.jpg | file.tga |
file | Lossless | file.bmp | file.tga |
file | Lossless | file.jpeg | file.tga |
file | Lossless | file.gif | file.tga |
file | Lossless | file.dib | file.tga |
file | Photo | file.png | file.tga |
file | Photo | file.jpg | file.jpg |
file | Photo | file.bmp | file.tga |
file | Photo | file.jpeg | file.jpg |
file | Photo | file.gif | file.tga |
file | Photo | file.dib | file.tga |
Shared folders
The behavior described for images works for shared folders and preloaded images as well. The shared folders algorithm looks for files on the system based on the name that is in the Generated file
column of the tables.
Preloaded images
Preloaded images strip the extension from the image name in the Generated file
column of the tables above.