4 ms·
Spaceman Diff: Diffing Images on the Command Line
- foobarbecue 7y agoZounds!
- noonespecial 7y ago5 stars. This is the best utility to detect if your image has been transmogrified.
- Tempest1981 7y agoYou can also use ImageMagick to generate a "diff" image: magick compare img1.jpg img2.jpg diff.jpg If you want a numeric result, you can use "-metric AE" (and a null output file) to count the number of pixels that differ. There is also a "fuzz" option: -fuzz 2%
- ghostDancer 7y agoI think he's referencing to the Calvin and Hobbes Transmogrifier. The name of the util reminds of one of the personalities of Calvin : Spaceman Spiff
- kngo 7y agoWould it be better if checksum the images ? Unless we want to actually see the actual changes between the two.
- yorwba 7y agoGit is already checksumming the images. This utility is for looking at the actual changes in case the checksums differ.
- dreamcompiler 7y agoChecksumming JPEG files is not that useful (to me, at least). There are lots of cases where the file checksum doesn't match but the image is still the same, for some definition of "same." Examples: EXIF/IPTC/etc metadata changes (sometimes this matters; sometimes it doesn't). Image has been rotated (this almost never matters). Image saved with different compression parameters (usually this matters but not always). Image saved with different resolution (ditto). Image has been slightly edited. The point here is that with images, data identity does not always equal file identity.
- loudmax 7y agoI wrote a command line utility for finding duplicate images: https://github.com/nickaubert/pdupe https://github.com/nickaubert/pdupe Useful if you're trying to reorganize pictures after migrating out of one photo management service or another that may have resized images or altered the resolution. It doesn't attempt to display the images (that's what feh or imv are for), it only quantifies images' similarity. I based on the logic on Geeqie's tool for finding similar images. My tool doesn't do anything that Geequie doesn't, except mine is run from the CLI.
- 6thaccount2 7y agoFor those to who it isn't obvious...the name is a pun on Calvin's imaginary alterego "Spaceman Spiff" in the comic Calvin & Hobbes.
- krilly 7y agoWish he just used tiv, it's a far superior terminal image viewer
- jefftk 7y agoIs that https://github.com/radare/tiv https://github.com/radare/tiv , https://github.com/stefanhaustein/TerminalImageViewer https://github.com/stefanhaustein/TerminalImageViewer , or something else?
- mceachen 7y agohttps://github.com/stefanhaustein/TerminalImageViewer https://github.com/stefanhaustein/TerminalImageViewer is amazing (but requires high-ascii font support from your term). And it's easy to install: `sudo snap install --edge tiv`
- zzo38computer 7y agoCouldn't you use Sixel to display pictures in the terminal?
- RhysU 7y ago> ImageMagick can do everything from image conversion to probably running a nuclear reactor. Please, someone chime in that they use 'convert' in some process at a reactor site.
- ken 7y agoAt my first job, our lab worked closely with the local TRIGA research reactor, and I did write and run some Java code that analyzed data collected in it. The Java license has always prohibited its use in nuclear reactors, but I figured a little offline analysis would be OK. The results didn't influence the use of radiation in any way. ImageMagick is old enough and I used it regularly back in the day, but I think (it's been 20 years) most of the data I got was just raw numbers so there probably wouldn't have been much call for it. I was also working on some (non-nuclear) image processing algorithms at the time, so it's quite likely I ran 'convert' on my laptop while inside the reactor building.
- jefftk 7y ago> The Java license has always prohibited its use in nuclear reactors, but I figured a little offline analysis would be OK https://www.oracle.com/technetwork/java/javase/downloads/jdk-6u21-license-159167.txt https://www.oracle.com/technetwork/java/javase/downloads/jdk... has: 3. RESTRICTIONS ... You acknowledge that Licensed Software is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility.