Donmai

A bit of warning about uploading from Nijie. **UPDATE, PLEASE READ**

Posted under General

**UPDATE** 2/17/2014

So in the past few days, Nijie has gone and changed things around again.

Basically, clicking the images no longer leads to the direct image, but a "pop-up" similar to pixiv. That's all fine and dandy but they added one more little "feature", namely lite versions of images.

Let's use http://nijie.info/view_popup.php?id=73763 as an example. The image loaded here is http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/6908_20140217213952.jpg and as you can see, it is pretty badly jpeg artifacted. Notice the small_light(q=40) section of the link, this determines the compression level of the image loaded. 40 seems to be the common default.

Fortunately, removing that part leads to the original image, like so http://pic04.nijie.info/nijie_picture/6908_20140217213952.jpg. Notice the difference in sizes: the lite version is 53.73 KB (55015 bytes) while the original is 685.53 KB (701979 bytes). That's quite a huge difference there.

For PNGS (http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/40650_20140217200552.png vs http://pic04.nijie.info/nijie_picture/40650_20140217200552.png) this actually INCREASES the file size.

For now, removing the small_lite(q=40) section works just fine, but who knows how much longer that will be the case. I've looked around the settings as best I could and did not notice any options to change this. If anyone with better Japanese skills can give a proper look, please do so.

**END UPDATE**

At some point in time most, if not all, pngs on the site at the time were converted to JPG. For example: http://nijie.info/view.php?id=4878 and post #971426

The easiest way to tell this has happened is to check the image's direct URL on nijie. From the top example, http://pic01.nijie.info/nijie_picture/4148_4878_1338201816.jpg.

If you run into a URL in that format (####_####_##########.jpg), then it was most likely a png before being converted.

The original URL would have been a single, long series of numbers with no breaks(################.png, though recently this was changed to ####_######### as the new default. Images with multiple versions on the page will be #_###_###_#########, http://nijie.info/view.php?id=25285 for example.)

Antoher way to tell is the dithering applied to the image during the conversion. Again, look closely at the above Nijie example.

Looking through source:*nijie.info/nijie_picture/*_*_*, I've found a few images that were uploaded after being converted: post #1240112 post #1240118 post #1240779 post #1256658 post #1263293 and post #1204000.

If you look closely on all of them, you'll notice the dithering applied to them after being converted. This is especially obvious with post #1263293 and its parent, post #933899.

Phew, okay, I'm terrible at explaining things but hopefully I got my point across: Be careful when uploading older images from Nijie, as it might have originally been a png that was converted.

As to why and when, exactly, Nijie did this, I have no idea. What's even more mysterious is the original images are actually still on Nijie's servers. It could be possible to contact Nijie's staff and let them know of the problem and hopefully have them revert the images to their original state.

Updated

(Not sure if I should make a new thread or not but it might be directly related to my above post, so I figured I'd just throw it here.)

So, I've noticed something that I should have noticed long ago: the direct links actually do have a unique identifier linking the image to the artist's account.

At first, direct links where like this: http://pic01.nijie.info/nijie_picture/201207100444027245.jpg Standard stuff, date(20120710) time(044402) and account number(7245).

Nowadays, though(probably around the same time the pngs were converted to jpgs?), links are like this: http://pic02.nijie.info/nijie_picture/7245_20121126013945.jpg As you can see, now it's account number, date and finally time.

The problem now, though, is getting the the links to work with the URLs list on the artist's page so that the Find Artist feature works right. I've tried to do what we do with pixiv and put http://pic02.nijie.info/nijie_picture/7245_ into the URLs list but unfortunately any image on nijie with pic02 in the URL will have Haruki's tag show up when using Find Artist, and I've no idea how to make it not do that. And then there's still the older link format with the account number at the end AND images with multiple versions that have the account number sandwiched between others(http://pic02.nijie.info/nijie_picture/diff/main/0_29423_3846_20121127003452.jpg, 3846 being the account number).

As you can see, bit of a bloody mess there but at the very least we have something to work with in getting Find Artist to pull tags for Nijie images. Just gonna need to kick danbooru's code around a bit to do it, it seems.

Ars said:

**UPDATE** 2/17/2014

So in the past few days, Nijie has gone and changed things around again.

Basically, clicking the images no longer leads to the direct image, but a "pop-up" similar to pixiv. That's all fine and dandy but they added one more little "feature", namely lite versions of images.

Let's use http://nijie.info/view_popup.php?id=73763 as an example. The image loaded here is http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/6908_20140217213952.jpg and as you can see, it is pretty badly jpeg artifacted. Notice the small_light(q=40) section of the link, this determines the compression level of the image loaded. 40 seems to be the common default.

Fortunately, removing that part leads to the original image, like so http://pic04.nijie.info/nijie_picture/6908_20140217213952.jpg. Notice the difference in sizes: the lite version is 53.73 KB (55015 bytes) while the original is 685.53 KB (701979 bytes). That's quite a huge difference there.

For PNGS (http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/40650_20140217200552.png vs http://pic04.nijie.info/nijie_picture/40650_20140217200552.png) this actually INCREASES the file size.

For now, removing the small_lite(q=40) section works just fine, but who knows how much longer that will be the case. I've looked around the settings as best I could and did not notice any options to change this. If anyone with better Japanese skills can give a proper look, please do so.

**END UPDATE**

does http://nijie.info/view_popup.php?id=73763 really load from small light? i tried the direct urls http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/6908_20140217213952.jpg and tested other values 0, 100, 200, and they're the same as http://pic04.nijie.info/nijie_picture/6908_20140217213952.jpg in file size and md5 signature. same for png. or did nijie change again?

ghostrigger said:

does http://nijie.info/view_popup.php?id=73763 really load from small light? i tried the direct urls http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/6908_20140217213952.jpg and tested other values 0, 100, 200, and they're the same as http://pic04.nijie.info/nijie_picture/6908_20140217213952.jpg in file size and md5 signature. same for png. or did nijie change again?

Original: http://pic04.nijie.info/nijie_picture/6908_20140217213952.jpg 685.53 KB (701979 bytes)

q=40: http://pic04.nijie.info/small_light%28q=40%29/nijie_picture/6908_20140217213952.jpg 53.73 KB (55015 bytes)

q=100: http://pic04.nijie.info/small_light%28q=100%29/nijie_picture/6908_20140217213952.jpg 725.86 KB (743280 bytes)

q=0: http://pic04.nijie.info/small_light%28q=0%29/nijie_picture/6908_20140217213952.jpg 725.86 KB (743280 bytes)

q=200: http://pic04.nijie.info/small_light%28q=200%29/nijie_picture/6908_20140217213952.jpg 725.86 KB (743280 bytes) (Seems 100 is the max)

q=10: http://pic04.nijie.info/small_light%28q=10%29/nijie_picture/6908_20140217213952.jpg 22.76 KB (23306 bytes) (Oh God I'm going to be sick)

q=1: http://pic04.nijie.info/small_light%28q=1%29/nijie_picture/6908_20140217213952.jpg 12.02 KB (12306 bytes) (Not even the dead can know peace from this evil)

Seems like q=0 just defaults to 100.

EDIT: Well, that's odd. After clearing my cache and reopening the lower quality links, they really are pointing to the original, but reopening the pop-up from http://nijie.info/view.php?id=73763 reloads the q=40 version. Some sort of weird caching issue seems to be going on or something. I'm stomped.

EDIT: Well, that's odd. After clearing my cache and reopening the lower quality links, they really are pointing to the original, but reopening the pop-up from http://nijie.info/view.php?id=73763 reloads the q=40 version. Some sort of weird caching issue seems to be going on or something. I'm stomped.

i'm not sure myself. i was able to see q=1 finally. yeah, it's horrible. maybe because of url encoding, browser setting or from nijie themselves.

http://pic04.nijie.info/small_light%28q=1%29/nijie_picture/6908_20140217213952.jpg -> points to original

http://pic04.nijie.info/small_light(q=1)/nijie_picture/6908_20140217213952.jpg -> terrible quality

the latter shows the valid small_light supposedly works. any deviation would result failure (which in our case desirable to get the original)

Just to point out, this q refers to jpeg quality settings. If you took the original image and resaved it with jpeg quality of 1 it would look identical to the q=1 image.

Only 40 quality is pretty low for a jpeg, many images need 90+ quality to look good. Which explains why some of these look so bad.

It seems pngs are visually identical regardless of what q you set in the url, which makes sense since pngs don't have jpeg quality settings.

Ars said:

I've looked around the settings as best I could and did not notice any options to change this. If anyone with better Japanese skills can give a proper look, please do so.

I gave the settings a look, but didn't see anything related to image quality. Doesn't really seem like something they'd give people the option to easily disable though, so I'm not surprised.

Though I think I saw something about "upgrade to gold membership to unlock more settings" on the advanced settings page; it may be possible for one of those settings to be image quality.

Ars said:

q=1: http://pic04.nijie.info/small_light%28q=1%29/nijie_picture/6908_20140217213952.jpg 12.02 KB (12306 bytes) (Not even the dead can know peace from this evil)

http://imgur.com/If0qc1l.jpg

---

Anyway, I wrote a quick userscript to always show the original image on these popup pages instead of the low quality one. I only tested it briefly, so don't be surprised if there's something wrong with it: Here.

Updated

Toks said:

Anyway, I wrote a quick userscript to always show the original image on these popup pages instead of the low quality one. I only tested it briefly, so don't be surprised if there's something wrong with it: Here.

Oooh, nice. Working pretty well so far, many thanks. Though I have to ask, would it be possible to have danbooru automatically grab the original image on upload? AND ONE MORE THING, for those who don't/won't/can't use greasemonkey, how about a bookmarklet?

Updated

Ars said:

Though I have to ask, would it be possible to have danbooru automatically grab the original image on upload?

Wait, is that even necessary? As you and ghostrigger just demonstrated, Nijie will serve you the full size version when you go to the lower quality urls directly, and Danbooru goes to urls directly. I just uploaded a q=1 url to my server and it resulted in the full size getting uploaded.

Ars said:

AND ONE MORE THING, for those who don't/won't/can't use greasemonkey, how about a bookmarklet?

I think this should work:

javascript:var img = document.querySelector("div.illust_click a img"); img.src = img.dataset.original; void(0);

Put that as the location of a bookmark and click it when viewing the image.

---

Also, I just noticed something: For Nijie posts with more than one image, only the first image will be artifacted, the others seem to be fine without having to do anything to them. Weird.

1