Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Embed JPG,PNG image with compression

Community Beginner ,
May 18, 2015 May 18, 2015

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.

TOPICS
Development
572
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 25, 2015 Jun 25, 2015

Moved to AIR development

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 25, 2015 Jun 25, 2015

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 26, 2015 Jun 26, 2015
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines