Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO view jpeg 2000 {jp2} images.
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 30 Aug 2002
Posts: 909
Location: US-FL-EST

PostPosted: Sun Dec 17, 2006 5:01 pm    Post subject: HOWTO view jpeg 2000 {jp2} images. Reply with quote

I'm going to commit a little bit of heresy because I'm going to tell you to install a package not yet supported in Gentoo Portage. In my defense, I will plead that 1} I'm not a programmer and haven't the least idea of how to create a custom ebuild and 2} it solves the question asked in the forum post here and 3} I've posted an ebuild request in gentoo bugzilla here.

Why do you care if you have the ability of viewing jpeg2000 images? Well, up to 3 weeks ago, I would have said you didn't need that capability. This is despite the fact that I've always included the USE flag 'jpeg2000'.

If you are an avid follower of space programs like the Mars Rovers, Cassini-Huygens etc, when you go to download pictures from the new Mars Reconnaissance Orbiter as posted at The HiRISE Operations Center (HiROC) at the University of Arizona's Lunar and Planetary Laboratory you will find all the high resolutions are in jpeg2000 format. Moreover, the images range in size from 150 megabytes to 1.2 gigabytes.

I don't care how big and fast your system is nor how many CPU cores you have stuffed in it, opening a 1.2 gigabyte compressed image is going to bring it to it's knees. You need an image viewer which will render only what is appearing on your screen at that moment. This is where OpenEV comes in.

From the project site: "OpenEV is a software library and application for viewing and analysing raster and vector geospatial data." There are binaries available and a CVS repository.

Since I'm not a programmer and I didn't want to fool with dependencies, I looked for an easier way to install OpenEV. It turns out there is a pre-built package called FWTools hosted at and it contains OpenEV and all it's dependencies.

The instructions couldn't be simpler:
% cd ~
% tar xzvf FWTools-linux-1.1.1.tar.gz
% cd FWTools-linux-1.1.1
% ./

Assuming you use bash:
% echo 'PATH=$PATH:$HOME/FWTools/bin_safe' >> ~/.bash_profile

If you use csh or tcsh:
% echo 'setenv PATH $PATH:$HOME/FWTools/bin_safe' >> ~/.cshrc

If you don't start a new shell, be sure that you restart your current shell so that the PATH variable is updated. Add "openev" to your favorite GUI desktop menu or do what I do which is open up an xterm and execute:
% openev &

Some other points:

Before installing OpenEV, I was able to open jpeg2000 files only in Kwickview and Kolourpaint. GIMP and Krita were both unable to open the images I downloaded from HiRise. While I was able to open an 18 meg jp2 image in both Kwickview and Kolourpaint, I was unable to wait the amount of time it was taking to open any larger jpeg2000 images. We're talking over 30 minutes to open a file.

There is an opportunity here for a real programmer to touch OpenEV and FWTools with some Gentoo Magic(tm). i.e. I'm certain that all the binaries in FWTools were built against i386. It sure would be nice to have FWTools and all it's included packages built against at least i686. And of course, AMD64 would be real nice too. For those of you whom might be interested, I opened ebuild request 158376 in Gentoo Bugzilla.

This installation method only works for the installing local user. It needs to be installed once each time for each local user that wants access to it. A global install provided by some Gentoo Magic(tm) would be great!

Finally, the pertinent emerge --info information:
Portage 2.1.2_rc3-r5 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.5-r0, i686)
System uname: i686 AMD Athlon(tm) XP
Gentoo Base System version 1.12.7
Last Sync: Sun, 17 Dec 2006 11:50:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
CFLAGS="-march=athlon-xp -O2 -pipe"

As you can see, I'm not running some monster system here. It's just an Athlon 1900+ based PC with 1 gig of DRAM. I'm pleased to report that OpenEV runs at an acceptable speed on this PC even with opening 486 meg jp2 files.
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Tux's lil' helper
Tux's lil' helper

Joined: 07 Jul 2002
Posts: 77

PostPosted: Thu Mar 08, 2007 6:34 pm    Post subject: Reply with quote

I also ran into the problem of not finding software to view jpeg2000 images. I tried the FWTools package, but unfortunately the link on maptools' site for FWTools-linux-1.2.1.tar.gz was broken. Anyway, I'd almost given up when I tried Jasper as a last shot. To my surprise, Jasper's 'jiv' command opened my jpeg2000 file quite nicely.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum