Skip to main content

JPG profiles

3 replies [Last post]
Anonymous

Hello everybody,

We are a company from Spain, specialized in ONLINE APPLICATIONS for DIGITAL
PHOTOGRAPHY. The technology we use is JAVA because allows us to work with
images ONLINE as no other technology. But, we have a problem with the JPG
images, when we have to scale them and mantain the PROFILE they have. We
have no problem scaling images (even with 10 Mpixels images), but we loose
the PROFILE, so the colours are not well viewed. How can we mantain the
profiles of the JPG images (user images) when our applets have to scale
them?

Thank you very much...

Guillermo Ripol

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Guillermo Ripol

Hello Andrew, I have test the application using the IMAGE IO library, but it
does not work. Only these lines:

ImageInputStream iis = ImageIO.createImageInputStream(ff);
reader.setInput(iis, true);
rimage = reader.read(0);

It is strange, because only with these three lines I can have the
BufferedImage, but when a I draw it:

g.drawImage (rimage)

the colours are not mantained. I can see the JPG picture, but all the
colours wrong.

I am testing it with the JDK 1.5. Any idea?

Sincerely,

Guillermo Ripol
Director General

------------------------------------------------
VIA INDICE
Online photographic solutions
www.viaindice.com

C/ Dos de Maig, 1
08172 Sant Cugat del Vallès
BARCELONA (SPAIN)
Tel.: +34 935 442 416

-----Mensaje original-----
De: Discussion list for Java 2D API
[mailto:JAVA2D-INTEREST@JAVA.SUN.COM]En nombre de Andrew Brygin
Enviado el: lunes, 11 de agosto de 2008 14:28
Para: JAVA2D-INTEREST@JAVA.SUN.COM
Asunto: Re: [JAVA2D] JPG profiles

Hello Guillermo,

I suspect that you are using java.awt.Toolkit to read images.
Tooklit does not provide support for built in color profiles for JPEG.
Embedded profile is ignored and this will likely lead to color
discrepancies
you described.

I'd suggest to use ImageIO API to read images. The jpeg plugin for
ImageIO is
able to read color profiles embedded in jpeg images and may either produce
buffered image based on this color profile or convert image data to
sRGB color
space.

ImageIO API is available since 1.4 but in the newer JDK it may have
much better
performance. I'd recommend to use JDK 6.

BTW, if you want to preserve colors but do not need to preserve
embedded profile
then I'd recommend to stick with default behavior of jdk 6 - it will
use custom profile
once to read and convert image to one of standard profiles. Usage of
true custom
color profiles may significantly degrade performance because
accelerated pipelines
are not used.

Thanks,
Andrew

Guillermo Ripol wrote:
> Hello everybody,
>
> We are a company from Spain, specialized in ONLINE APPLICATIONS for
DIGITAL
> PHOTOGRAPHY. The technology we use is JAVA because allows us to work with
> images ONLINE as no other technology. But, we have a problem with the JPG
> images, when we have to scale them and mantain the PROFILE they have. We
> have no problem scaling images (even with 10 Mpixels images), but we loose
> the PROFILE, so the colours are not well viewed. How can we mantain the
> profiles of the JPG images (user images) when our applets have to scale
> them?
>
> Thank you very much...
>
> Guillermo Ripol
>
>
===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Andrew Brygin

Hello Guillermo,

I suspect that you are using java.awt.Toolkit to read images.
Tooklit does not provide support for built in color profiles for JPEG.
Embedded profile is ignored and this will likely lead to color
discrepancies
you described.

I'd suggest to use ImageIO API to read images. The jpeg plugin for
ImageIO is
able to read color profiles embedded in jpeg images and may either produce
buffered image based on this color profile or convert image data to
sRGB color
space.

ImageIO API is available since 1.4 but in the newer JDK it may have
much better
performance. I'd recommend to use JDK 6.

BTW, if you want to preserve colors but do not need to preserve
embedded profile
then I'd recommend to stick with default behavior of jdk 6 - it will
use custom profile
once to read and convert image to one of standard profiles. Usage of
true custom
color profiles may significantly degrade performance because
accelerated pipelines
are not used.

Thanks,
Andrew

Guillermo Ripol wrote:
> Hello everybody,
>
> We are a company from Spain, specialized in ONLINE APPLICATIONS for DIGITAL
> PHOTOGRAPHY. The technology we use is JAVA because allows us to work with
> images ONLINE as no other technology. But, we have a problem with the JPG
> images, when we have to scale them and mantain the PROFILE they have. We
> have no problem scaling images (even with 10 Mpixels images), but we loose
> the PROFILE, so the colours are not well viewed. How can we mantain the
> profiles of the JPG images (user images) when our applets have to scale
> them?
>
> Thank you very much...
>
> Guillermo Ripol
>
> ===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Guillermo Ripol

Thank you very much Andrew... it seems it works with the IMAGE IO.

Sincerely,

Guillermo Ripol
Director General

------------------------------------------------
VIA INDICE
Online photographic solutions
www.viaindice.com

C/ Dos de Maig, 1
08172 Sant Cugat del Vallès
BARCELONA (SPAIN)
Tel.: +34 935 442 416

-----Mensaje original-----
De: Discussion list for Java 2D API
[mailto:JAVA2D-INTEREST@JAVA.SUN.COM]En nombre de Andrew Brygin
Enviado el: lunes, 11 de agosto de 2008 14:28
Para: JAVA2D-INTEREST@JAVA.SUN.COM
Asunto: Re: [JAVA2D] JPG profiles

Hello Guillermo,

I suspect that you are using java.awt.Toolkit to read images.
Tooklit does not provide support for built in color profiles for JPEG.
Embedded profile is ignored and this will likely lead to color
discrepancies
you described.

I'd suggest to use ImageIO API to read images. The jpeg plugin for
ImageIO is
able to read color profiles embedded in jpeg images and may either produce
buffered image based on this color profile or convert image data to
sRGB color
space.

ImageIO API is available since 1.4 but in the newer JDK it may have
much better
performance. I'd recommend to use JDK 6.

BTW, if you want to preserve colors but do not need to preserve
embedded profile
then I'd recommend to stick with default behavior of jdk 6 - it will
use custom profile
once to read and convert image to one of standard profiles. Usage of
true custom
color profiles may significantly degrade performance because
accelerated pipelines
are not used.

Thanks,
Andrew

Guillermo Ripol wrote:
> Hello everybody,
>
> We are a company from Spain, specialized in ONLINE APPLICATIONS for
DIGITAL
> PHOTOGRAPHY. The technology we use is JAVA because allows us to work with
> images ONLINE as no other technology. But, we have a problem with the JPG
> images, when we have to scale them and mantain the PROFILE they have. We
> have no problem scaling images (even with 10 Mpixels images), but we loose
> the PROFILE, so the colours are not well viewed. How can we mantain the
> profiles of the JPG images (user images) when our applets have to scale
> them?
>
> Thank you very much...
>
> Guillermo Ripol
>
>
===========================================================================
> To unsubscribe, send email to listserv@java.sun.com and include in the
body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".