|
Black outline when saving files |
Aikei_c
Member #14,871
January 2013
|
Hello everyone! It's been awhile since I last posted here.
|
Todd Cope
Member #998
November 2000
|
If you are going to be saving loaded images, you need to turn off pre-multiplied alpha. With pre-multiplied alpha turned on, which is the default, the pixel data is modified on load. This is good for the most common use cases, since pre-multiplied alpha gives more accurate blending. Use al_set_new_bitmap_flags(ALLEGRO_NO_PREMULTIPLIED_ALPHA) before loading any images you intend to save. If you need to display bitmaps loaded this way on-screen, be sure to use al_set_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA) before drawing to the display. |
Aikei_c
Member #14,871
January 2013
|
Thanks a lot, Todd! This really helped. |
|