215 points · by yasoob · 6y ago · 46 comments
Very cool to be able to manipulate the bytes directly and seeing how it affects the image.
Thought about writing an hex editor or adding the hex fiend functionality to other hex editors based on the templates of hex fiend.
[0] http://ridiculousfish.com/hexfiend/
> Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions.
From the website. Btw wireshark is is one of the most useful tools for system administrators (especially in combination with tcpdump and ssh) and giving up on a project, because your browser bugs out is kind of bad form. You should at least take a look at it. Anyway hope you change your mind and have fun ;) some of my most interesting nights I have spent with wireshark
It's much more a critique of the state of the web than of the project itself.
BTW, both behaviors (insane CPU usage while scrolling and Cloudflare checking) are reproducible in Safari, Chrome and Firefox, so it's not the browser that's bugging out, but the website scroll highjacking that's poorly written.
https://media.ccc.de/search?p=Ange+Albertini
The Preserve Arcade Games talk is also good, I only realized now that both talks were by the same person.
https://github.com/ilyakurdyukov/jpeg-quantsmooth (good for most mid-quality and high-quality images)
https://github.com/victorvde/jpeg2png (use for very low-quality images, slower)
jpeg-quantsmooth gives a sharper output (use "-q6" option).
jpeg2png output is a little blurry, but it does a better job of unblocking very low-quality images.
Another algorithm that should work but I haven't seen tried is edge-aware chroma upsampling. libjpeg uses nearest neighbor upscaling for the subsampled color planes, which is why JPEG looks so bad when there's a transition from eg saturated red to black.
I'm suggesting something like eedi3 (http://avisynth.nl/index.php/Eedi3) but guided by the luma plane.
Oh, you can also jointly optimize the YUV-RGB conversion because if the pixel ends up out of range in RGB space it is probably a compression artifact. I read a paper on this once but haven't seen it implemented.
H.261 (a video format) is roughly of the same if not slightly less complexity, and also makes a good weekend project.
I'm trying to build a small C# library to support reading image types to learn about them, png was quite understandable but jpg is a little trickier, given I panic when I see maths.
I also learned a lot from the various JPEG articles on ImpulseAdventure (no affiliation), e.g.:
https://www.impulseadventure.com/photo/jpeg-quantization.htm...
https://www.impulseadventure.com/photo/jpeg-compression.html
https://www.impulseadventure.com/photo/chroma-subsampling.ht...
They also have a lot of practical stuff (which chroma subsampling will Photoshop actually use when you save at 80% quality?) in addition to the theory.
The model used by JPEG is not that unusual in image processing, so this can help us to understand many types of processes.
This person has a whole bunch of this stuff! Gold!
If I wanted to develop a custom JPEG decoder, what would be the easiest way to get image data from a jpeg file into Tensorflow (or numpy, Pytorch, etc.) tensors? I mean the raw DCT coefficients, and the coefficient table?
> to make JPEG store data losslessly: use grayscale, 100% quality, then either width or eight to 1 pixel, or duplicate the padded data 8 times (JPEG images are stored in 8x8 blocks).
Interesting. I wonder if this is used internally in any applications.
2 - JPEG algorithm allows to have lossless data without padding
3 - For lossless data rar/arc/ace are better then JPEG
Internally, JPEG has the key techniques required to compress photos well, and nothing else. Most newer formats are based on the same principles, except each bit is upgraded to the point of diminishing returns.
HEIF and AVIF compress twice as well as JPEG, but in terms of complexity and computational requirements are hundreds of times more complex.
The economics of the camera market right now will make adoption of new formats (and the additional/more expensive hardware in the camera to support it) slow and jpeg is a very reasonable format for photographers to shoot when they don't want/need to shoot raw.
Also, some of the alternative formats have licensing or patent issues that would effectively block wide adoption.
BPG isn't supported by any browsers.
WEBP isn't supported by IE11 or Safari.
Though there are other lossful encoding schemes developed since that either produce better results with the same data size or comparable results with better compression (or both). But the improvements have not been large enough to make the industry as a whole consider making the effort to support these other formats (and in some cases there would be licensing/patent issues making support legally/financially onerous on top of the coding/testing required).
I think they mean JAY-pheg.