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

Apply a darken-gradient to Bitmap image with AS3

Explorer ,
Jan 22, 2020 Jan 22, 2020

I'd like to add a gradient to a .png image (so that one side of the image is darker then the other).

 

Does anyone know how I might go about this?

 

Thanks in advance.

TOPICS
ActionScript , How to
325
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
LEGEND ,
Jan 22, 2020 Jan 22, 2020

Just draw a same-sized rectangle over it with an alpha gradient fill.

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
Explorer ,
Jan 22, 2020 Jan 22, 2020

But in the case of .pngs I don't want the shadow to show over the transparent areas.

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
LEGEND ,
Jan 23, 2020 Jan 23, 2020

Should have mentioned that in the first post. Time for you to learn Pixel Bender then and create a shader.

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
Explorer ,
Jan 23, 2020 Jan 23, 2020
LATEST

I'll take a look into that. Thanks for the reply.

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