### ----------------------------------------------------
### -- Image::Resize
### -- Licenses: Artistic-2.0
### -- Authors: Dagur Valberg Johannsson, Raku Community
### -- File: t/03-convert.rakutest
### ----------------------------------------------------
use Test;
use Image::Resize;

use lib $*PROGRAM.parent;
use common;

plan 2;

my $camelia = ~$*PROGRAM.sibling("images/500px-Camelia.png");
my $width  = 500;
my $height = 366;

# Back and forth between formats.
for <gif jpg> -> $ext {
    my $ext-img = tmp-file($ext);
    my $png-img = tmp-file("png");
    resize-image($camelia, $ext-img, 16, 16);
    resize-image($ext-img, $png-img, 1.0);

    my ($x, $y) = get-png-size($png-img);
    ok $x == 16 && $y == 16, "png -> $ext -> png";
}

# vim: expandtab shiftwidth=4


