kleisauke / wasm-vips

libvips for the browser and Node.js, compiled to WebAssembly with Emscripten.
https://kleisauke.github.io/wasm-vips/
MIT License
463 stars 25 forks source link

Interlace option in jpegsaveBuffer doesn’t seem to work #66

Closed miloxeon closed 1 week ago

miloxeon commented 3 months ago

Hi. First, your lib is a game changer! I'm a big fan.

This is the possible bug I'm talking about:

const outputBuffer = image.jpegsaveBuffer({ Q: 90, interlace: true })
const blob = new Blob([outputBuffer], { type: 'image/jpeg' })
const url = URL.createObjectURL(blob)
// <a href="${url}" download="image.jpg" rel="download">Download image</a>

The image produced this way still loads top to bottom. What should I do to make my jpegs progressive using wasm-vips?

kleisauke commented 3 months ago

I could not reproduce this using this playground link.

Tested by uploading the produced x.jpg to https://google.github.io/attention-center/. Here's how the image looks like when a certain percentage of its bytes have loaded: 15% 30% 50%
15-percent 30-percent 50-percent
kleisauke commented 4 weeks ago

@miloxeon Were you able to make any progress with this?

kleisauke commented 1 week ago

Closing due to inactivity but please feel free to reopen with more details if further help is required.