3

I have a problem with FabricJs on android devices. When I open a big image and I zoom in, the image becomes blurry and the text is not understandable. On ios devices the image is sharp.

var canvas = new fabric.Canvas('c');

var rect = new fabric.Image.fromURL('http://vlinde.show/new_test.jpg', (img) => {
  fabric.Image.prototype.strokeWidth = 1;
  let oImg = img.set({
    left: 0,
    top: 0
  });
  oImg.selectable = true;
  canvas.add(oImg);
  canvas.absolutePan(new fabric.Point(6350, 5700));
  canvas.setZoom(2.5);
}, {
  enableRetinaScaling: true,
  objectCaching: false,
  imageSmoothingEnabled: true
});


canvas.renderAll();

Here you can see a demo: https://jsfiddle.net/iad_vlinde/bethy6rk/1/

This is how it looks on android device with the same code: http://vlinde.show/android.jpg

Alexandru D
  • 121
  • 4
  • This is just speculation, but could Anti Aliasing be the issue here? If so, [this](https://stackoverflow.com/a/14068216/8602926) might help – Sv443 Apr 05 '19 at 09:53
  • 1
    Works fine in firefox android, not in chrome. – Durga Apr 05 '19 at 10:27

0 Answers0