Help for this page

Select Code to Download


  1. or download this
    # Check if we are limited by height or width of the source image
    my $factor = $sourcewidth / $targetwidth;
    ...
    )
    my $newwidth = int($sourcewidth / $factor);
    my $newheight = int($sourceheight / $factor);
    
  2. or download this
    $newpic->copyResized($sourcepic,
                                  $destx, $desty, # DEST X Y
    ...
                                  $newwidth, $newheight, # DEST W H
                                  $sourcewidth, $sourceheight, # SRC W H
                              );
    
  3. or download this
    sub printAddGreyscaleImage {
        my ($self, $filename, $isbindata, $imagesoftness) = @_;
    ...
        $self->{imgoffs} += $desth;
        return;
    }