Skip to main content
michalg2123270
Participant
May 18, 2015 3:32 PM UTC
Question

Embed JPG,PNG image with compression

Hello Flash community.

I'm using ADOBE AIR 17 and I have problem with embed image with compression.

my code is here:

[Embed(mime Type="image/jpeg", source="test.jpg", compression="true", quality="80")] and compiler has problem

Error message:

Error: Could not find definition flash.utils.Bitmap referenced by embedded source C:\test.jpg.

Error: The definition of base class Bitmap was not found.

when I embed only this, working correctly [Embed(source="test.jpg")]

Thank you for any ideas.

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

funkysoul
Inspiring
Jun 26, 2015 7:52 AM UTC

Have you tried using PNG?

As the Documentation states:

compression=true|false

For lossless images only (GIF and PNG) specifies to compress the embedded image in the generated SWF file.

Translate
kheftel
Inspiring
Jun 25, 2015 9:11 PM UTC

Wouldn't you compress the JPG at 80 quality before embedding, in your image editor?

Translate
jeromiec83223024
Inspiring
Jun 25, 2015 7:03 PM UTC

Moved to AIR development

Translate