sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

Show image differences

Open jfcherng opened this issue 7 years ago • 17 comments

Problem description

The current SM displays image diff as binary contents. It would be good even if it simply shows the before/after images. Here's Github's example: https://git.io/fApgi

Preferred solution

The basic 2-up mode is enough I guess.

Screenshots

snipaste_2018-09-29_01-21-26

jfcherng avatar Sep 28 '18 17:09 jfcherng

If you're willing to do more than just the 2-up, Gitkraken also provides an option to show a difference filter of the two images.

Example: Example

Gethe avatar Oct 16 '18 15:10 Gethe

This is still a very real problem for asset repos, reviewing changes in Sublime Merge is impossible right now unfortunately 🙁

outadoc avatar Jun 03 '20 10:06 outadoc

This is still a very real problem for asset repos, reviewing changes in Sublime Merge is impossible right now unfortunately

It's already listed on the What’s Next section of the latest Sublime Merge blog post. https://www.sublimetext.com/blog/articles/sublime-merge-2-announcement

So I believe the dev team will have this done sooner or later :)

jfcherng avatar Jun 03 '20 10:06 jfcherng

This has been added in dev build 2024!

srbs avatar Jul 17 '20 06:07 srbs

@srbs Thanks for this. I am SUPER HAPPY!!

Snipaste_2020-07-17_14-41-30


Maybe you would like to improve this:

When selecting an image file from a tree, it's blamed like a text file.

Snipaste_2020-07-17_14-39-54

Feel free to close this issue if you think the above one is as design or deserve another issue.

jfcherng avatar Jul 17 '20 06:07 jfcherng

And I really do love how all of this came together, dark mode looks really awesome! My only thoughts might be to lower the darkness of the transparent background checkers in light mode & support svg one day (but still retaining the ability to look at the raw xml).

srbs avatar Jul 17 '20 06:07 srbs

Thanks for the feedback so far everyone - I'll definitely be noting this down for future revisions of image diffing.

@jfcherng we can keep this issue open for blame + images (I feel it definitely falls under the realm image diffs).

I know there are other popular image diffing modes such as difference highlighting etc, so feel free to share if this is essential to your workflow too, and this can be taken on board for consideration.

Kind regards, - Dylan

dpjohnst avatar Jul 17 '20 06:07 dpjohnst

It's a wonderful function! Can it support webP preview or diff in the future?

joechan-cq avatar Jan 28 '21 12:01 joechan-cq

It's worth noting that we've added support for PSD, TGA, PPM, and PGM image formats in the latest development build (2042)

dpjohnst avatar Jan 29 '21 05:01 dpjohnst

It's worth noting that we've added support for PSD, TGA, PPM, and PGM image formats in the latest development build (2042)

Unfortunately, especially in legacy systems, .PGM is also a common extension for text files that represent a "Program". e.g. calc.tax.pgm.

So, this recent change in SM 2042 is causing a lot of problems for me because all of my .pgm files are now coming up for image comparison instead of text.

Is there any SM setting or configuration file where I can define how file name suffixes should be treated by SM; Text or Image?

Edit: I reverted back to 2041. Maybe I should get off the Dev channel and switch back to Stable? 🤔

kpowick avatar Feb 04 '21 17:02 kpowick

SM should be able to do some level of file introspection to determine if image or not. @kpowick, probably worth creating a new bug report for that issue.

srbs avatar Feb 05 '21 02:02 srbs

For those watching, bug report for file introspection was created here (thanks @kpowick): #1055

srbs avatar Feb 08 '21 11:02 srbs

@srbs I'm happy to report that #1055 is resolved as of Dev build 2044. Great work SM team!

kpowick avatar Feb 13 '21 17:02 kpowick

No SVG support yet?

3v1n0 avatar Mar 23 '22 18:03 3v1n0

Hi all,

Just a quick update that we've added WebP image diffing support :tada:

Kind regards, - Dylan from Sublime HQ

dpjohnst avatar Mar 16 '23 22:03 dpjohnst

Hi, by any chance could there be a way to see if the file sizes have been changed before/after? In some cases there are minor differences visually or dimensions-wise but it's a diff nonetheless if the file has been optimized. Currently there is no way to see it within the UI :(

zvuc avatar Mar 07 '24 07:03 zvuc

pdf images are not treated as images for the purpose of diffing. Is there a way to do this?

jc-castillo avatar Jul 11 '24 15:07 jc-castillo