Skip to main content
michalg2123270
Participant
May 18, 2015
Question

Embed JPG,PNG image with compression

  • May 18, 2015
  • 3 replies
  • 574 views

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 has been closed for replies.

3 replies

funkysoul
Inspiring
June 26, 2015

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.

kheftel
Inspiring
June 25, 2015

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

jeromiec83223024
Community Manager
Community Manager
June 25, 2015

Moved to AIR development