Home

Support


What's New !


About

Contact

 

 

Morgan products


All Morgan Products

JPEG Technology

MJPEG Codec

MJPEG Codec for OEM

LSI MJPEG Codec


JPEG2000 Technology

JPEG Toolbox
create your
JPEG2000 picture

optimize JPEG ones

MJPEG2000 Codec

JPEG2000 IE Plug-In

JPEG2000 Netscape/Mozilla Plug-In
 

Audio utility
Stream Switcher

 

 

ressort.gif (2844 bytes)
Developer Site

 

 

Inserting JPEG2000 Pictures

How to insert an <embed></embed> tag that automatically offers a download link to the right plugin (IE or Mozilla-likes) ?
 

Morgan Multimedia programmers have developped a script written in javascript that detects the browser used to access the page where you want to include JPEG2000 pictures (.j2c or .jp2 files).

With this information, it builds the <embed></embed> tag that allows the JPEG2000 file to be displayed, or, if no plugin is found, that gives the link to the right plugin (IE or Mozilla).

This script can be found in the file named "j2kpic.js" that you can download here.

The function is img_jp2k(filename, width, height).

Here is how to use it:

 

   - Place the file j2kpic.js in the directory where your html file is.
   - Open the html page in an editor.
   - Inside the <head></head> tag, insert this line to include the script in your page:

 

<script LANGUAGE="JavaScript" src="j2kpic.js"></script>

 

   - Inside the <body></body> tag, look for the places where you want to insert a JPEG2000 picture.
   There, instead of inserting the <embed></embed> tag, just insert this line:

 

<script language="JavaScript">img_jp2k('MyJPEG2kPic.j2c', X, Y); </script>

 

where "MyJPEG2kPic" is the JPEG2000 file you want to embed, and X and Y are respectively the width and the height.
 

If you look for a real example, just look at the source code of this very page.

 

JPEG2000 Products :

JPEG Toolbox
create your
JPEG2000 picture

optimize JPEG ones

MJPEG2000 Codec

JPEG2000 IE Plug-In

JPEG2000 Mozilla/Netscape Plug-In

Package

Register
Morgan Product !

 

Related links :

JPEG2000 advantages

more about JPEG2000

 

 

 
  


Last update : May 26, 2006 - Copyright © 1990 - 2005 Morgan Multimedia