Quote:
Originally Posted by tompe
There is a flag "--imagerescale 0" which I think will disable all scaling. I checked th code now and from the code without actually testing I draw that conclusion (so i might be wrong...).
|
I think you are wrong.
In MobiPerl/Util.pm, there's this:
Code:
# pdurrant
# do not resize large images if the filesize is OK,
# even if pixel dimensions are large
if ($filesize < $maxsize and
((not $rescale_large_images) || ($x <= $maxwidth and $y <= maxheight))
and $type ne "PNG"
and (not defined $scale_factor or $scale_factor == 1.0)) {
# No transformation has to be done, keep data as is
...
}
That's where I want the program to enter, but the condition is "if $filesize < $maxsize" and other things. I want that even if the filesize is larger, so I had to modify the if and make it:
Code:
if (($filesize < $maxsize and
((not $rescale_large_images) || ($x <= $maxwidth and $y <= $maxheight))
and $type ne "PNG"
and (not defined $scale_factor or $scale_factor == 1.0)) or (not $rescale_large_images)) {
which is not perfect (it won't touch PNGs, which it should), but it works for me.