1

I have images that are in a custom file-format (basically containing RAW data) and and I want to have them viewable in a browser (without converting them to standard formats such as jpg/png).

Is it possible to write a browser plugin that would read my-custom-format and display the images in the browser (like say a PDF reader) ?

I can do this using Flash, but I am trying to see if I can avoid having to download the Flash SWF to display the image.

Can a browser plugin/extension get binary data from the web, process it and render it on a specific area on the browser screen ? Which browsers would it be possible on and which ones would it not be ?

2 Answers2

1

You can download binary file with XMLHttpRequest and display in on <canvas> element, where you have full control over each pixel.

Now if you mean you want the browser to natively recognize your custom image format this could be tricky.

serg
  • 109,619
  • 77
  • 317
  • 330
1

Yes, you can do this in all browsers. ActiveX for IE, and NPAPI for everything else.

smorgan
  • 20,228
  • 3
  • 47
  • 55