AuthorTopic: Chrome now supports pixel zoom!  (Read 14620 times)

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Chrome now supports pixel zoom!

on: July 16, 2014, 09:13:13 am
If you update Chrome to 41, you'll have pixel-perfect zoom! THE FUTURE IS HERE.

Outdated Haxx:

This doesn't work anymore in the latest versions of Chrome! But don't worry, proper support for non-blurry zoom is already in the latest Chrome (Canary 41)

I made this TamperMonkey script for Chrome to disable the blurry zoom, based on the excellent work over at PixelJoint:
https://openuserjs.org/scripts/meskens.simongmail.com/Crisp_Pixel_Zoom

You can install TamperMonkey here:
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo

I was pretty tired of people claiming you can't make a zoomer for Pixelation due to cross-origin policies, when there's several ways to get around that, a TamperMonkey script being one, using the createPattern hack being another.

Have fun with it! Should work for recent Chrome and probably Opera (I didn't test Opera, as I don't like it).

« Last Edit: March 15, 2015, 09:37:56 pm by Gil »

Offline Crow

  • 0011
  • **
  • Posts: 646
  • Karma: +0/-0
  • Technicanimal
    • View Profile

Re: No more blurry zoom in Chrome!

Reply #1 on: July 16, 2014, 10:19:31 am
Hm, that's interesting. I couldn't get anything to work without running into cross origin trouble, so I'll be looking into that.
« Last Edit: July 16, 2014, 10:22:51 am by Crow »
Discord: Ennea#9999

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: No more blurry zoom in Chrome!

Reply #2 on: July 16, 2014, 03:41:34 pm
I just updated to version 2.0. The code is way cleaner and better, for those looking into that. I just need to redo the hack for fixing large GIFs, so if you see a large GIF that doesn't work, tell me.

Also, I'd be interested to know if this works at all for you. If it doesn't, mention OS/Browser please :)

Here's what Rikfuzz found out so far:
iOS7:
Chrome -  :y: :y: (both good)
Safari -  :y: :y: (both good)

Android:
Chrome -  :n:  :y: (image blurry)
Firefox -  :y:   ???  (canvas is crisp but no animation)

OSX:
Chrome -  :n:  :y: (image blurry)
Safari -  :y: :y: (both good)
Opera -  :y:  :n: (canvas is broken https://dl.dropboxusercontent.com/u/1534394/osx_opera.jpg)
Firefox current -  :y:   ???  (canvas is crisp but no animation, no errors in console)
Firefox old (3.6) - :y: :n: (don't think canvas is available, didn't think it was worth looking into. Shows unzoomed image)

Windows 7:
IE10 -  :y: :n: (canvas blurry and not animated)
Chrome -  :n:  :y: (image blurry)

XP (lol):
IE8 -  :y: :n:  (JSfiddle doesn't actually manage to initialise, haha, but IE8 was pre-antialiasing and pre-canvas so... assumption).

Offline Crow

  • 0011
  • **
  • Posts: 646
  • Karma: +0/-0
  • Technicanimal
    • View Profile

Re: No more blurry zoom!

Reply #3 on: July 16, 2014, 04:06:07 pm
For the record, keep in mind this is still a workaround. Tests done on non-Webkit browsers are not exactly necessary.
Discord: Ennea#9999

Offline PixelPiledriver

  • 0011
  • **
  • Posts: 997
  • Karma: +6/-0
  • Yo!
    • View Profile
    • My Blog

Re: No more blurry zoom!

Reply #4 on: July 16, 2014, 06:49:37 pm
Cool.  :y:
Windows 8: Chrome --> works
And knowing that it is, we seek what it is... ~ Aristotle, Posterior Analytics, Chapter 1

Offline Mathias

  • 0100
  • ***
  • Posts: 1794
  • Karma: +2/-0
  • im not real
    • http://pixeljoint.com/p/9542.htm
    • View Profile

Re: No more blurry zoom!

Reply #5 on: July 16, 2014, 07:59:45 pm
I'm on Windows 7, Chrome. It's working! Images zoom with nearest neighbor. Thank you!!

Offline Crow

  • 0011
  • **
  • Posts: 646
  • Karma: +0/-0
  • Technicanimal
    • View Profile

Re: No more blurry zoom!

Reply #6 on: July 16, 2014, 08:22:13 pm
Stuck.
Discord: Ennea#9999

Offline Batzy

  • 0010
  • *
  • Posts: 169
  • Karma: +0/-0
  • Huzzah....
    • View Profile
    • GameBros

Re: No more blurry zoom!

Reply #7 on: July 16, 2014, 08:33:23 pm
win8.1 chrome works like a charm <3 thank you so much Gil  :y:

Offline Mr. Fahrenheit

  • 0010
  • *
  • Posts: 326
  • Karma: +0/-0
    • View Profile

Re: No more blurry zoom!

Reply #8 on: July 16, 2014, 11:16:18 pm
Thank you!  :'( I've waited so long.

Actually, on some pages, such as the daily challenge thread pictures near the bottom of the page didn't load when I had this script on. When I turned the script off it loaded just fine. Is this happening for anyone else?
« Last Edit: July 16, 2014, 11:23:05 pm by Mr. Fahrenheit »

Offline Gil

  • 0100
  • ***
  • Posts: 1543
  • Karma: +1/-0
  • Too square to be hip
    • http://pixeljoint.com/p/475.htm
    • View Profile
    • My Portfolio

Re: No more blurry zoom!

Reply #9 on: July 17, 2014, 06:01:48 am
Thank you!  :'( I've waited so long.

Actually, on some pages, such as the daily challenge thread pictures near the bottom of the page didn't load when I had this script on. When I turned the script off it loaded just fine. Is this happening for anyone else?
Yep, I ran into that one too. I haven't figured out yet why it's happening, but yes, your best bet is to turn it off for a sec :/

In time I'll try to iron out the kinks. Do note that you can right click an image -> open in new tab and it will act like Pixelation where you can click to zoom. So if you had to turn off the script, you can still look at images that way.

Good to know that most forms of Windows/Chrome work. That's the most important one I want to support.

Edit: actually, I figured out some tricks I can do to optimize. The next version will have these and I'm assuming it'll fix that elusive bug where the images stop rendering halfway down a thread.
« Last Edit: July 17, 2014, 06:12:46 am by Gil »