4 ms·
GitHub New Features: Rendering and diffing images
- voltagex_ 12y agoSimple (UI wise, I'm sure the implementation is tricky), yet very useful. I wonder if there's a way to represent changes that might not be easily seen - say you ran an image through pngcrush.
- sunilkumarc 12y ago"The main purpose of pngcrush is to reduce the size of the PNG IDAT datastream by trying various combinations of compression methods and delta filters." - Wikipedia. So there will not be any change in the image visually. The 'crushed' image will have the same quality as the source image. So even if you run an image through pngcrush, this new github feature should not find any difference between the original image and the 'cushed' one(I think).
- cleverjake 12y ago1. This isn't a new feature, its existed for years. 2. Git detects a difference, so github will detect a difference. That being said, there wouldn't be a visible difference when comparing the two images.
- sunilkumarc 12y agoSo, what kind of change will the git detect when an image is crushed (when there is no visual difference between original and curshed) ?
- peterwiese 12y agoThe same as if there were a visual difference between them: none. GitHub doesn't detect anything besides changes of the file hash. But that suffices for it do display the two images in the new image viewer.
- michaelmior 12y agoAs far as git is concerned, the PNG file is just a bag of bits. It will record the changes in the IDAT chunks just as with changes in any other files. The images would appear identical on GitHub because they haven't changed visually.
- BrandonSmith 12y agopngcrush optimizes the file losslessly. Looks the same, smaller file size. Since the file does change, git will see a difference (doesn't care what it looks like). To a user, viewing the diff through this Github feature, it would look like nothing changed between commits.