[bitmaps]
allegro=../examples/data/allegro.pcx

[fonts]
builtin=al_create_builtin_font()

# We can't assume that a backbuffer with alpha is available, so draw
# to a temporary bitmap.
[template]
op0=temp = al_create_bitmap(640, 480)
op1=al_set_target_bitmap(temp)
op2=al_clear_to_color(brown)
op3=b = al_load_bitmap_flags(filename, flags)
op4=al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA)
op5=al_draw_bitmap(b, 0, 0, 0)
op6=al_set_target_bitmap(target)
op7=al_set_separate_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA, ALLEGRO_ADD, ALLEGRO_ZERO, ALLEGRO_ONE)
op8=al_draw_bitmap(temp, 0, 0, 0)
flags=ALLEGRO_NO_PREMULTIPLIED_ALPHA

[test bmp]
extend=template
filename=../examples/data/fakeamp.bmp
hash=62176b87

[test bmp 8bpp]
extend=template
filename=../examples/data/alexlogo.bmp
hash=08b3a51d

[test jpg]
extend=template
filename=../examples/data/obp.jpg
hash=8e37f5f3
sig=lXWWYJaWKicWTKIXYKdecgPKaYKaeHLRLbYKhJSEFHbZKhJIHFJdYKn1IEFabVKPSQNPNNNKKKKKKKKKK

[test pcx]
extend=template
filename=../examples/data/allegro.pcx
hash=c44929e5

[test png]
extend=template
filename=../examples/data/mysha256x256.png
hash=771a3491

[test png premul]
extend=template
filename=../examples/data/mysha256x256.png
flags=0
hash=48965052

[test tga]
extend=template
filename=../examples/data/fixed_font.tga
hash=64fa3221

[test webp]
extend=template
filename=../examples/data/mysha256x256.webp
hash=771a3491

[test webp premul]
extend=template
filename=../examples/data/mysha256x256.webp
flags=0
hash=48965052


# These indexed images may be displayed in shades of red (OpenGL >= 3)
# or greyscale (OpenGL < 3).

[test bmp indexed]
extend=template
filename=../examples/data/alexlogo.bmp
flags=ALLEGRO_KEEP_INDEX
hash=1d899e47

[test bmp indexed uncompressed]
extend=template
filename=../examples/data/gradient1.bmp
flags=ALLEGRO_KEEP_INDEX
hash=b5ba9d35

[test pcx indexed]
extend=template
filename=../examples/data/allegro.pcx
flags=ALLEGRO_KEEP_INDEX
hash=681b712d
hash_hw=6fb8e2d5

[test png indexed]
extend=template
filename=../examples/data/alexlogo.png
flags=ALLEGRO_KEEP_INDEX
hash=1d899e47

[test png palette]
extend=template
filename=../examples/data/mysha_pal.png
flags=0
# TODO: Figure out why this fails on 32 bits.
sig=FlOKKKKKKugMKKKKKKjLKKKKKKK26FKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

[test png interlaced]
extend=template
filename=../examples/data/icon.png
flags=0
hash=9e6b5342

[save template]
op0=al_save_bitmap(filename, allegro)
op1=b = al_load_bitmap_flags(filename, ALLEGRO_NO_PREMULTIPLIED_ALPHA)
op2=al_clear_to_color(brown)
op3=al_draw_bitmap(b, 0, 0, 0)

[test save bmp]
extend=save template
filename=tmp.bmp
hash=c44929e5

[test save jpg]
extend=save template
filename=tmp.jpg
sig=jdelWKKKKaYmeXKKKKLNVNKKKKKHHHLLKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

[test save pcx]
extend=save template
filename=tmp.pcx
hash=c44929e5

[test save png]
extend=save template
filename=tmp.png
hash=c44929e5

[test save tga]
extend=save template
filename=tmp.tga
hash=c44929e5

[test save webp]
extend=save template
filename=tmp.webp
hash=c44929e5

[identify]
op0=al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA)
op1=ext = al_identify_bitmap(filename)
op2=al_draw_text(builtin, yellow, 0, 0, 0, ext)

[test identify bmp]
extend = identify
filename=../examples/data/fakeamp.bmp
hash=b5436ae7

[test identify png]
extend = identify
filename=../examples/data/alexlogo.png
hash=05da299b

[test identify jpg]
extend = identify
filename=../examples/data/obp.jpg
hash=6e2b0f7d

[test identify pcx]
extend = identify
filename=../examples/data/allegro.pcx
hash=5d1d24db

[test identify tga]
extend = identify
filename=../examples/data/fixed_font.tga
hash=fca11c13

[test identify webp]
extend = identify
filename=../examples/data/mysha256x256.webp
hash=30a6aae7

[test identify dds]
extend = identify
filename=../examples/data/mysha_dxt5.dds
hash=84ab6fb5