We have a 3D image that we converted to blob object and loaded into the canvas. It returns array buffer of the 3D image. We use "const canvasImageData = ctx.getImageData(0,0,canvas.width, canvas.height)" to get the image buffer data. Then, we convert it to RGBA form. Then, we use "ctx.putImageData(canvasImageData,0,0)" to show the image inside the canvas and it is working. Now how to add zoom and pan features on the image.
We tried using ctx.translate() and ctx.scale() however, it didn't work and ctx.drawImage() also stopped working.
We need your help to solve this problem as we are beginners.
Your help will be highly appreciated.
Best Regards,
Sunita