jerch / xterm-addon-image

Image addon for xterm.js
MIT License
51 stars 6 forks source link

possible striping in image output #34

Closed jerch closed 1 year ago

jerch commented 1 year ago

On different browser zoom levels (pixelDeviceRatio != 1) image output may show nasty striping. This prolly results from always flooring values here: https://github.com/jerch/xterm-addon-image/blob/2229ef1c5879f1b411f605a83de11e8c7d6785ef/src/ImageRenderer.ts#L184-L185

A quickfix is to always ceil the right and the bottom values. This further needs a workaround for safari, which will go bonkers on out of bounds access. A more involved solution is to determine the edge cases, where flooring creates those gaps and ceil only in that case (conditional overprinting).

jerch commented 1 year ago

Fixes with bc9b966.