I am trying to add a jpg file to my canvas but of no go. Here is the simple code that i am working with:
my $mw = new MainWindow;
my $drawing = $mw->Canvas(-width => 500, -height => 500,
-background => "white") -> pack;
my $xpm = $drawing->createBitmap(0, 0, -bitmap => '@myfile.bmp');
my $xpm = $drawing->createImage(0, 0, -bitmap => '@myfile.jpg');
#$drawing->createText(200,275,-text=>"Some text on my drawing!",-ancho
Except the Bitmap and the image, i am able to create all other shapes (the lines that are commented) in the Canvas. I am receiving the below error message
format error in bitmap dataerror reading bitmap file "myfile.bmp" at C:/Perl/site/lib/Tk.pm line 250.
Am i doing any thing wrong. Please guide me in right direction.