Hi, I'm not sure what you are trying to do in your code, but there is 1 glaring error right from the start.
# This photo is larger than the 1024x800 app size my $big_image = SDLx::Sprite->new( image => '/path/to/photo.jpg' ); my $lil_image = SDL::GFX::Rotozoom::surface( $big_image, 0, 0.7, SMOOTHING_ON );
If you read perldoc SDL::GFX::Rotozoom you will see that SDL::GFX::Rotozoom::surface requires a surface as input, NOT a SDLx::Sprite as you do in your code.

From the perldoc:

my $picture = SDL::Video::load_BMP('test.bmp'); my $rotated = SDL::GFX::Rotozoom::surface( $picture, 45, .8, SMOOTHING_ON +);
Furthermore, from looking thru the SDL perldocs, it seems you can only load BMP files at this time. Have a look at the example script at /examples/GFX/script_roto.pl in the SDL module distribution.

Upon further investigation, it looks like you can load a jpg into an SDL::Surface with SDL::Image

use SDL::Image; SDL::Image::init(IMG_INIT_JPG); #loads JPG support SDL::Image::load("file.png"); #loads PNG support SDL::Image::quit(); #unloads everything

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re: SDL Image Slideshow by zentara
in thread SDL Image Slideshow by Xenther

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.