[ home / agg / all ] [ g / qa / megu ] [ sync / text ] [ bun / qa4 / ViQa ]

/b/ - Boson Technology

Also known as Boson /g/
Name
Options
Subject
Comment
File
Embed
Password (For file deletion.)
Markup tags exist for bold, itallics, header, spoiler etc. as listed in " [options] > View Formatting "

New sticky on /b/
Proud part of the /qa/ webring with http://4taba.net/, http://wakabb.net/, and https://qa.booru.org/

[Return] [Bottom] [Catalog]

File: 1555154642179.jpg (40.92 KB, 1024x1024, q16.jpg)

 No.1252

I want to see what it looks like here.
https://boards.4channel.org/qa/thread/2694111#p2694344

 No.1253

File: 1555154706091.jpg (40.92 KB, 1024x1024, q64.jpg)


 No.1254

I think we use imagemagic here but don't remember

 No.1257

File: 1555213423030.jpg (102.46 KB, 1504x1488, ucm.jpg)

convert -size 512x512 xc:red blank512.ppm
for i in {1..64}; do echo 16; done > qtable16.txt
cjpeg -qtables qtable16.txt -qslots 0 -sample 1x1 blank512.ppm > blank512-q16.jpg
dcttransform 'dct.map((x,i) => {if (i%64) return 0; x=(i>>6)%64; y=(i>>12)%64; c=(i>>18); return 128*((Math.floor(x/8)&(1<<c)) ? 1 : -1)})' blank512-q16.jpg > 8colors.jpg
dcttransform 'dct.map((x,i) => {if (i%64) return 0; x=(i>>6)%64; y=(i>>12)%64; c=(i>>18); return 16*((Math.floor(x/8)&(1<<c)) ? 1 : -1)})' blank512-q16.jpg > 8legal.jpg

convert ui.jpg -resize 12.5% +dither -colorspace YCbCr -remap 8colors.jpg -colorspace sRGB -remap 8legal.jpg -scale 800% ucm-ui.ppm
convert catmaid.jpg -resize 12.5% +dither -colorspace YCbCr -remap 8colors.jpg -colorspace sRGB -remap 8legal.jpg -scale 800% ucm-catmaid.ppm
convert miku.png -resize 12.5% +dither -colorspace YCbCr -remap 8colors.jpg -colorspace sRGB -remap 8legal.jpg -scale 800% ucm-miku.ppm
for f in ucm-{ui,catmaid,miku}.ppm; do cjpeg -qtables qtable16.txt -qslots 0 -sample 1x1 "$f" > "${f/.ppm/.jpg}"; done
for f in ucm-{ui,catmaid,miku}.jpg; do dctextract < "$f"; done | dcteval 'n=dct.length/3; a=new Uint16Array(n); for(i=0;i<n;i++) a[i]=32*dct[i]-16*dct[i+n]-8*dct[i+2*n]; a' > ucm.dct
dctreplace ucm.dct < ucm-ui.jpg > ucm.jpg

 No.1258

>>1254
Nevermind it's GraphicsMagick+gifsicle
a fork of imagemagic with something for handling gifs

 No.1259

File: 1555243962287.jpg (1.3 KB, 120x112, acx.jpg)

for i in {1..64}; do echo 64; done > qtable64.txt
convert -size 120x112 xc:red ppm:- | cjpeg -qtables qtable64.txt -qslots 0 -sample 1x1 > acx-blank.jpg
dcttransform 'a=new Uint16Array(3*7*2*15*64); for(x=0;x<8;x++) for(p=4;p<=10;p++) for(o=-1;o<=0;o++) {v=(1<<p)+o-(p==10?2:0); y=2*(p-4)+(o+1); a[y*15*64 + x*2*64 + x]=v}; a' acx-blank.jpg > acx.jpg

 No.1260

File: 1555244480689.jpg (1.64 KB, 120x176, acx2.jpg)

No thumbnails for small images, I see. That could lend itself to abuse in the form of people uploading small-dimensions large-filesize images, but it's not like it would be any worse than that thread full of Youtube videos.

convert -size 120x176 xc:red ppm:- | cjpeg -qtables qtable64.txt -qslots 0 -sample 1x1 > acx2-blank.jpg
dcttransform 'a=new Uint16Array(3*11*2*15*64); for(x=0;x<8;x++) for(p=0;p<=10;p++) for(o=-1;o<=0;o++) {v=(1<<p)+o-(p==10?2:0); y=2*p+(o+1); a[y*15*64 + x*2*64 + x]=v}; a' acx2-blank.jpg > acx2.jpg

 No.1261

File: 1555244704047.jpg (1.63 KB, 176x120, acy2.jpg)

convert -size 176x120 xc:red ppm:- | cjpeg -qtables qtable64.txt -qslots 0 -sample 1x1 > acy2-blank.jpg
dcttransform 'a=new Uint16Array(3*15*11*2*64); for(y=0;y<8;y++) for(p=0;p<=10;p++) for(o=-1;o<=0;o++) {v=(1<<p)+o-(p==10?2:0); x=2*p+(o+1); a[y*2*11*2*64 + x*64 + y*8]=v}; a' acy2-blank.jpg > acy2.jpg

the dct* programs are https://gitgud.io/dcttransform/dcttransform

 No.1262

>>1260
Never mind, my mistake, there are thumbnails, I guess I just missed it. Probably helped that the thumbnail rendered it the exact same way my browser does.

 No.1266

File: 1555390912332.jpg (2.13 MB, 1500x1488, ucm.jpg)


 No.1267

File: 1555391102946.jpg (88.95 KB, 1016x1016, acdc.jpg)


 No.1268

File: 1555391389533.jpg (79.05 KB, 1016x1016, acdc-y.jpg)

>>1266
for i in {1..64}; do echo 16; done > qtable16.txt
convert -size 1016x1016 xc:red ppm:- | cjpeg -qtables qtable16.txt -qslots 0 -sample 1x1 > acdc-blank.jpg
dcttransform 'a=new Uint16Array(3*127*127*64); for(y=-63;y<=63;y++) for(x=-63;x<=63;x++) {i=((y+63)*127+(x+63))*64; a[i]=16*x; a[i+1]=16*y;}; a' acdc-blank.jpg > acdc.jpg

And this pic is the same thing along the other axis.

dcttransform 'a=new Uint16Array(3*127*127*64); for(y=-63;y<=63;y++) for(x=-63;x<=63;x++) {i=((y+63)*127+(x+63))*64; a[i]=16*y; a[i+8]=16*x;}; a' acdc-blank.jpg > acdc-y.jpg

The same tests on 4chan:
https://boards.4channel.org/qa/thread/2694934#p2696613

So far it looks like the thumbnailer here behaves the same way as the previewer in my file picker. So that's another decoder to examine.

 No.1270

File: 1555461081450.jpg (8.37 MB, 8184x8184, table.jpg)

for i in {1..64}; do echo 16; done > qtable16.txt
convert -size 8184x8184 xc:red ppm:- | cjpeg -qtables qtable16.txt -qslots 0 -sample 1x1 > table-blank.jpg
dcttransform 'a=new Uint16Array(3*1023*1023*64); for(j=0;j<16;j++) for(y=0;y<63;y++) for(i=0;i<16;i++) for(x=0;x<63;x++) {p=((j*64+y)*1023+(i*64+x))*64; a[p+(i<8?i:8*(i-8))]=32*(x-31); a[p+(j<8?j:8*(j-8))]=32*(y-31);}; a' table-blank.jpg > table.jpg

 No.1271

File: 1555461158334.jpg (1.99 MB, 4088x4088, table-xx.jpg)

jpegtran -crop 4088x4088+0+0 table.jpg > table-xx.jpg

 No.1272

File: 1555463295858.jpg (23.34 KB, 504x504, table-acdc.jpg)

jpegtran -crop 504x504+0+512 table.jpg > table-acdc.jpg

 No.1273

>>1270
>>1271
>>1272
Looks like beyond certain resolution the thumbnailer here only uses the DC components of the JPEG.

 No.1274

File: 1555463662643.jpg (68.16 KB, 1016x1016, table-crop1016.jpg)


 No.1275

File: 1555463749189.jpg (395.6 KB, 2040x2040, table-crop2040.jpg)


 No.1276

File: 1555464389378.jpg (171.12 KB, 1432x1432, table-crop1432.jpg)


 No.1277

File: 1555464413421.jpg (159.82 KB, 1392x1392, table-crop1392.jpg)


 No.1278

File: 1555464501110.jpg (162.05 KB, 1393x1393, table-crop1393.jpg)


 No.1279

File: 1555464572762.jpg (162.05 KB, 1400x1400, table-crop1400.jpg)


 No.1280

File: 1555464796380.jpg (1.86 MB, 1392x1392, ucm-crop1392.jpg)

>>1266
Let's see what happens if we crop this one.

 No.1281

File: 1555573203001.jpg (773.43 KB, 1504x1488, ulcm.jpg)


 No.1282

File: 1555618657869.png (199.01 KB, 320x297, e6c648188d.png)

>>1281
I can tell who u, c, and m are, but not l. Does it stand for Comic Lo or something?

 No.1283

File: 1555622154558.jpg (803.59 KB, 1200x1190, 58809736_p0.jpg)




[Return] [Top] [Catalog] [Post a Reply]
Delete Post [ ]
[ home / agg / all ] [ g / qa / megu ] [ sync / text ] [ bun / qa4 / ViQa ]
0.159366