in reply to Re^2: How to create JPEG of specified size
in thread How to create JPEG of specified size

I do not want the junk to be ignored.

What does "ignored" mean? Clearly you're not expecting to do anything with the image. That sounds like a kind of ignoring.

My suggestion would be to add bulk in the jpeg comment:

my $jpeg = create_jpeg( height => 1, width => 1 ); save_jpeg_file( $jpeg, $file ); insert_jpeg_comment( $jpeg, ' ' x ($desired_size - (-s $file)) ); # bu +lk up the comment save_jpeg_file( $jpeg, $file ); # adjust again if necessary.

(note - functions above are pseudo.)

A word spoken in Mind will reach its own level, in the objective world, by its own weight

Replies are listed 'Best First'.
Re^4: How to create JPEG of specified size
by Limbic~Region (Chancellor) on Jul 25, 2007 at 17:43 UTC
    jdporter,
    Clearly you're not expecting to do anything with the image

    I have no idea what gave you that impression. Just because I am not authorized to describe how it is going to be used or why a fake of the same physical size should be a viable substitute doesn't mean that the fake will not be processed.

    In the 5 minutes I have researched JPEG comments it appears that this indeed will be a good way of taking a tiny valid JPEG and expanding it to any desired size. Thank you. After I get it working and test it I will post a CUFP or something.

    Cheers - L~R