Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Can i Compare two images in perl ? (It's a myth!)

by Anonymous Monk
on May 31, 2011 at 13:08 UTC ( #907449=note: print w/replies, xml ) Need Help??


in reply to Re^2: Can i Compare two images in perl ? (It's a myth!)
in thread Can i Compare two images in perl ?

Those are PNGs, not uncomressed bitmaps.

I certainly wouldn't expect that to work.

  • Comment on Re^3: Can i Compare two images in perl ? (It's a myth!)

Replies are listed 'Best First'.
Re^4: Can i Compare two images in perl ? (Still a myth!)
by BrowserUk (Pope) on May 31, 2011 at 13:43 UTC

    Okay. I saved those same two pngs as bmps; deleted the 3 old zips; and then compressed the bmps per your post:

    C:\test>dir ?.bmp 31/05/2011 14:33 720,054 1.bmp 31/05/2011 14:33 720,054 2.bmp 2 File(s) 1,440,108 bytes C:\test>del 1.zip 2.zip 3.zip C:\test>zip 1.zip 1.bmp adding: 1.bmp (160 bytes security) (deflated 100%) C:\test>zip 2.zip 2.bmp adding: 2.bmp (160 bytes security) (deflated 100%) C:\test>zip 3.zip 1.bmp 2.bmp adding: 1.bmp (160 bytes security) (deflated 100%) adding: 2.bmp (160 bytes security) (deflated 100%) C:\test>dir ?.zip 31/05/2011 14:34 2,376 1.zip 31/05/2011 14:35 2,376 2.zip 31/05/2011 14:35 4,730 3.zip

    (2376 + 2376) / 4370 = 1.0874141876430205949656750572082.

    Still nowhere near the 2.0 you would expect if this worked.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Concatenating the bmps doesn't help much either. I got 1.12

      Perhaps we need a theoretical perfect compression algorithm?

        Great minds :)

        C:\test>copy 1.bmp/b+2.bmp/b 3.bmp 1.bmp 2.bmp 1 file(s) copied. C:\test>del 3.zip C:\test>zip 3.zip 3.bmp adding: 3.bmp (160 bytes security) (deflated 100%) C:\test>dir ?.zip 31/05/2011 14:34 2,376 1.zip 31/05/2011 14:35 2,376 2.zip 31/05/2011 14:47 4,472 3.zip

        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://907449]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-08-18 00:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (294 votes). Check out past polls.

    Notices?