Re: problems with decoding: resulting image is corrupt

From: Joe Smith (joe_at_inwap.com)
Date: 03/22/05

  • Next message: Joe Smith: "Re: 1"
    Date: Tue, 22 Mar 2005 02:58:32 -0800
    
    

    Bjorn Jensen wrote:

    > My resulting image har nearly same size of original (but not exact) and the
    > nu.jpg can be shown,
    > but it is modified so much, that it look totally different.... why?

    You have to use binmode() when dealing with binary files.

    > open(UD, ">nu.jpg") or die "$!";

       open(UD, '>', 'nu.jpg') or die "Cannot create nu.jpg: $!";
       binmode(UD);

            -Joe


  • Next message: Joe Smith: "Re: 1"