Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Fri Oct 24, 2014 10:34 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Create 12bit JPEG files
Unread postPosted: Wed Jan 19, 2011 8:30 am 
Offline
User avatar

Joined: Thu Dec 31, 2009 5:20 am
Posts: 296
Location: Bålsta, Sweden
Hi,

I need to test some hardware that I am designing and need a tools that can create 12bit JPEG files, b/w or colour?

/michael

_________________
--
No Microsoft product was used in any way to write or send this text.
If you use a Microsoft product to read it, you're doing so at your own
risk.


Top
 Profile  
 
Unread postPosted: Fri Jan 21, 2011 2:55 pm 
Offline

Joined: Tue Aug 01, 2006 7:40 am
Posts: 136
Location: London
libjpeg can be compiled for 12 bit/channel support (though you lose 8 bit/channel support in the process). You will need to write something to load or generate your image before using libjpeg to write the jpeg codestreams. Not sure anything commercially makes 12 bit jpegs. I use libjpeg in my code but there's been just no call for 12 bit files.


Top
 Profile  
 
Unread postPosted: Fri Jan 21, 2011 4:33 pm 
Offline
User avatar

Joined: Thu Dec 31, 2009 5:20 am
Posts: 296
Location: Bålsta, Sweden
Being a HW guy thats is to much for me to do. We do have some apps that does that but I wanted a simplier tool to make the files.

The HW I am doing does 12 but JPEG but since I have some problems and the SW side have issues to read my data I was looking for something to test on to make sure if SW or me was to blame.
I am surprised that imagej cant write nor read 12 but JPEG, otherwise a great java code!

_________________
--
No Microsoft product was used in any way to write or send this text.
If you use a Microsoft product to read it, you're doing so at your own
risk.


Top
 Profile  
 
Unread postPosted: Sat Jan 22, 2011 9:46 pm 
Offline
User avatar

Joined: Sun Mar 18, 2007 3:25 pm
Posts: 1898
Location: Minneapolis, Minnesota USA
gdal claims to be able to do it: http://www.gdal.org/frmt_jpeg.html

A wiki page: http://trac.osgeo.org/gdal/wiki/TIFF12BitJPEG

from the install.txt file in the current version of libjpeg:
Code:
Support for 12-bit-deep pixel data:

The JPEG standard allows either 8-bit or 12-bit data precision.  (For color,
this means 8 or 12 bits per channel, of course.)  If you need to work with
deeper than 8-bit data, you can compile the IJG code for 12-bit operation.
To do so:
  1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8.
  2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED,
     because the code for those formats doesn't handle 12-bit data and won't
     even compile.  (The PPM code does work, as explained below.  The GIF
     code works too; it scales 8-bit GIF data to and from 12-bit depth
     automatically.)
  3. Compile.  Don't expect "make test" to pass, since the supplied test
     files are for 8-bit data.

Currently, 12-bit support does not work on 16-bit-int machines.

Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa;
so you'll want to keep around a regular 8-bit compilation as well.
(Run-time selection of data depth, to allow a single copy that does both,
is possible but would probably slow things down considerably; it's very low
on our to-do list.)

_________________
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group