The Un-Official Proxomitron Forum
converting jpg to jp2 - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Filter Help/Request (/forumdisplay.php?fid=31)
+--- Thread: converting jpg to jp2 (/showthread.php?tid=818)



converting jpg to jp2 - degarb - Jun. 10, 2006 04:50 PM

I am testing a jpg to jp2 proxy with Opera and IE.

Problem is that jp2 view fine, unless embedded in the html.

I don't know if this is because the html code is pointing to jpg (they can point to gif but display jpg, via rabbit).

I need a filter to convert the html code to embed the jp2s.

http://www.morgan-multimedia.com/JPEG2000/TEST.J2C

ccsinternet.org Is the man.

I am degarb at g mail.


RE: converting jpg to jp2 - JJoe - Jun. 11, 2006 02:44 PM

Assuming that you have the plugin installed.

http://www.morgan-multimedia.com/JPEG2000/J2K_how-to.htm
Does the page work without the "jpg to jp2" proxy?
If so, I'd think the "HTML" problem isn't the problem.

If the proxy converts the jpg to jp2 but the filename remains "example.jpg", you may need to alter the content-type header. Otherwise, I'd guess: Opera may ask to download a file; IE may show the picture. The proxy's instructions should cover this problem.

HTH


RE: converting jpg to jp2 - degarb - Jun. 11, 2006 02:53 PM

The how to page works with jp2 showing. Jp2 display fine.

However using old html page and converting all jpgs to jp2-via this proxy, for fast smooth images on dialup-, all embedded jp2 files do not display.

1. I can give anyone the proxy settings, if they email me. Not sure I want to flood his home dsl with 1000x of people.
2. I need a proxo filter to convert a standard html to show the jp2 files in page. a simple jpg to jp2 didn't work in web page filter.

Also, I can tell anyone about this free accelerator, if they can help me write this filter.


RE: converting jpg to jp2 - JJoe - Jun. 11, 2006 06:17 PM

Very strange...

So the page your browser sees has code like
<IMG SRC="TN_Example.JPG" ALT="Example.jpg">
but the JPGs are really JPG2000 and require a plugin that requires the embed or object tag.
<embed SRC="TN_Example.JPG" ALT="Example.jpg">
How...

Does
Code:
[Patterns]
Name = "Test "
Active = TRUE
Multi = TRUE
Bounds = "<img*>"
Limit = 700
Match = "<img(*(jpg|jpeg)*>)\1"
Replace = "<embed\1"
help anywhere?
It's too simple to get them all.
You should be able to test it at http://news.yahoo.com/



RE: converting jpg to jp2 - degarb - Jun. 12, 2006 12:57 AM

69.174.94.28:9664 FOR ANYONE WILLING TO TEST THIS.

Proxy compresses html, and converts jpg to jp2.


RE: converting jpg to jp2 - JJoe - Jun. 12, 2006 01:50 AM

Basically the proxy is converting all images over a certain size to jp2.
An appropriate content-type header, image/jp2, is also sent.

If I use Proxomitron to simply change all "<img*>" to "<embed*>":
IE works ok.
Opera displays the image only if it is jp2. <embed*> did not display a gif. The images displayed were sometimes useless.
Mozilla shows the image only if the extension is jp2 and <embed*> is used.
So I think this setup really only works well with IE. Unless the other browsers' behaviours can be modified.
Not sure what will happen if IE is told to obey the extension...

I'll think about a better filter but the one posted may be the best for Proxomitron's default set.
Could add a test for the proxy, tho.
BTW Sidki's set will probably sniff all this out and stop it.

How do people use this proxy without Proxomitron? Safari?


RE: converting jpg to jp2 - degarb - Jun. 14, 2006 12:01 PM

This is a test proxy. Normally, the isp sends jpgs at a reduced q. But looking for a less blocky, more natural, yet more aggressive compression scheme. All open source and free.


RE: converting jpg to jp2 - degarb - Jun. 15, 2006 02:30 PM

Say on http://www.ars.usda.gov/is/graphics/photos/jun99/k8448-1.htm
using the 9664 jp2 proxy.

I got bounds <img*>
matching <img(*(jpg|jpeg)*>)\1
and replacement <embed\1>

This works on this page but not on gallery or many pages.


RE: converting jpg to jp2 - JJoe - Jun. 16, 2006 06:49 PM

degarb Wrote:Say on http://www.ars.usda.gov/is/graphics/photos/jun99/k8448-1.htm
using the 9664 jp2 proxy.
For me, the gallery pages at that site lock up IE when the filter and proxy are used. I'm not sure why.
Opera and proxy works but the pictures are ugly and the embed tag breaks the javascript navigation.

degarb Wrote:This works on this page but not on gallery or many pages.
Large GIFs won't display with the filter. Nor will JP2s without the jpg or jpeg extension.
Some script drawn galleries will be very difficult to convert.
Like most things, a filter that covers everything is probably impossible.
You'll probably need built in JP2 support for this to really work well.
But post an address and maybe I'll see what we can do.