[Geoserver-users] jpeg quality in WMS output

Hello,

I need to raise the jpeg quality when using it as output format for WMS. I’m using geoserver 1.6.5 and, to my surprise, when looking around I couldn’t find any way to do this.

Is there a setting for this that I’m not seeing, or is it indeed a missing feature?

/Björn

Ciao Bjorn,
actually, you are right, there is no way to configure this. Default
quality is 75% (visually lossless).
It could be implemented quite easily though, but I guess it is the
kind of the thing that gets procrastined indefinitely unitl someone
really needs it :-).

Simone.

On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell <bjorn.harrtell@anonymised.com> wrote:

Hello,

I need to raise the jpeg quality when using it as output format for WMS. I'm
using geoserver 1.6.5 and, to my surprise, when looking around I couldn't
find any way to do this.

Is there a setting for this that I'm not seeing, or is it indeed a missing
feature?

/Björn

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

Hehe, well I really need it :wink:

Seriously though, if this is a very low priority thing, we would like to patch it ourselves. If you could point out the class that we need to tinker with it would be much appriciated.

/Björn

On Fri, Oct 3, 2008 at 6:30 PM, Simone Giannecchini <simboss1@…84…> wrote:

Ciao Bjorn,
actually, you are right, there is no way to configure this. Default
quality is 75% (visually lossless).
It could be implemented quite easily though, but I guess it is the
kind of the thing that gets procrastined indefinitely unitl someone
really needs it :-).

Simone.

On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell <bjorn.harrtell@…84…> wrote:

Hello,

I need to raise the jpeg quality when using it as output format for WMS. I’m
using geoserver 1.6.5 and, to my surprise, when looking around I couldn’t
find any way to do this.

Is there a setting for this that I’m not seeing, or is it indeed a missing
feature?

/Björn


This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini


Well,
actually, quite a few things would be involved at both the geotools
and geoserver level. It takes more time to explain it than to do it
:-).
Thinking...., you might want to track down how the hint to use non
native jpeg writer is implemented through the various layers. When you
get to the ImageWorker class in geotools, I'll tell you how to change
writer settings.

Simone.

On Fri, Oct 3, 2008 at 6:35 PM, Björn Harrtell <bjorn.harrtell@anonymised.com> wrote:

Hehe, well I really need it :wink:

Seriously though, if this is a very low priority thing, we would like to
patch it ourselves. If you could point out the class that we need to tinker
with it would be much appriciated.

/Björn

On Fri, Oct 3, 2008 at 6:30 PM, Simone Giannecchini <simboss1@anonymised.com>
wrote:

Ciao Bjorn,
actually, you are right, there is no way to configure this. Default
quality is 75% (visually lossless).
It could be implemented quite easily though, but I guess it is the
kind of the thing that gets procrastined indefinitely unitl someone
really needs it :-).

Simone.

On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell <bjorn.harrtell@anonymised.com.>
wrote:
> Hello,
>
> I need to raise the jpeg quality when using it as output format for WMS.
> I'm
> using geoserver 1.6.5 and, to my surprise, when looking around I
> couldn't
> find any way to do this.
>
> Is there a setting for this that I'm not seeing, or is it indeed a
> missing
> feature?
>
> /Björn
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>

--
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

--
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

Hmm first time looking at the gigantic source that makes up geotools and geoserver I don’t understand much of “the hint to use non native jpeg writer is implemented through the various layers.” :slight_smile:

But looking at JPEGMapProducer.java line 47:

new ImageWorker(image).writeJPEG(outStream, “JPEG”, 0.75f, JPEGNativeAcc.booleanValue());

Wouldn’t a quick and dirty fix be to adjust the value, recompile and replace?

/Björn

On Fri, Oct 3, 2008 at 6:48 PM, Simone Giannecchini <simboss1@…84…> wrote:

Well,
actually, quite a few things would be involved at both the geotools
and geoserver level. It takes more time to explain it than to do it
:-).
Thinking…, you might want to track down how the hint to use non
native jpeg writer is implemented through the various layers. When you
get to the ImageWorker class in geotools, I’ll tell you how to change
writer settings.

Simone.

On Fri, Oct 3, 2008 at 6:35 PM, Björn Harrtell <bjorn.harrtell@…84…> wrote:

Hehe, well I really need it :wink:

Seriously though, if this is a very low priority thing, we would like to
patch it ourselves. If you could point out the class that we need to tinker
with it would be much appriciated.

/Björn

On Fri, Oct 3, 2008 at 6:30 PM, Simone Giannecchini <simboss1@…84…>
wrote:

Ciao Bjorn,
actually, you are right, there is no way to configure this. Default
quality is 75% (visually lossless).
It could be implemented quite easily though, but I guess it is the
kind of the thing that gets procrastined indefinitely unitl someone
really needs it :-).

Simone.

On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell <bjorn.harrtell@…84…>
wrote:

Hello,

I need to raise the jpeg quality when using it as output format for WMS.
I’m
using geoserver 1.6.5 and, to my surprise, when looking around I
couldn’t
find any way to do this.

Is there a setting for this that I’m not seeing, or is it indeed a
missing
feature?

/Björn


This SF.Net email is sponsored by the Moblin Your Move Developer’s
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini



Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini


Ciao Bjorn,
if what you are looking for is a quick & dirty fix, what you describe
above would do what you need?
I thought you wanted the capability to this kind of stuff from the UI...

Simone.

On Sat, Oct 4, 2008 at 2:57 PM, Björn Harrtell <bjorn.harrtell@anonymised.com> wrote:

Hmm first time looking at the gigantic source that makes up geotools and
geoserver I don't understand much of "the hint to use non native jpeg writer
is implemented through the various layers." :slight_smile:

But looking at JPEGMapProducer.java line 47:

new ImageWorker(image).writeJPEG(outStream, "JPEG", 0.75f,
JPEGNativeAcc.booleanValue());

Wouldn't a quick and dirty fix be to adjust the value, recompile and
replace?

/Björn

On Fri, Oct 3, 2008 at 6:48 PM, Simone Giannecchini <simboss1@anonymised.com>
wrote:

Well,
actually, quite a few things would be involved at both the geotools
and geoserver level. It takes more time to explain it than to do it
:-).
Thinking...., you might want to track down how the hint to use non
native jpeg writer is implemented through the various layers. When you
get to the ImageWorker class in geotools, I'll tell you how to change
writer settings.

Simone.

On Fri, Oct 3, 2008 at 6:35 PM, Björn Harrtell <bjorn.harrtell@anonymised.com.>
wrote:
> Hehe, well I really need it :wink:
>
> Seriously though, if this is a very low priority thing, we would like to
> patch it ourselves. If you could point out the class that we need to
> tinker
> with it would be much appriciated.
>
> /Björn
>
> On Fri, Oct 3, 2008 at 6:30 PM, Simone Giannecchini <simboss1@anonymised.com>
> wrote:
>>
>> Ciao Bjorn,
>> actually, you are right, there is no way to configure this. Default
>> quality is 75% (visually lossless).
>> It could be implemented quite easily though, but I guess it is the
>> kind of the thing that gets procrastined indefinitely unitl someone
>> really needs it :-).
>>
>>
>> Simone.
>>
>> On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell
>> <bjorn.harrtell@anonymised.com>
>> wrote:
>> > Hello,
>> >
>> > I need to raise the jpeg quality when using it as output format for
>> > WMS.
>> > I'm
>> > using geoserver 1.6.5 and, to my surprise, when looking around I
>> > couldn't
>> > find any way to do this.
>> >
>> > Is there a setting for this that I'm not seeing, or is it indeed a
>> > missing
>> > feature?
>> >
>> > /Björn
>> >
>> >
>> >
>> > -------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Moblin Your Move Developer's
>> > challenge
>> > Build the coolest Linux based applications with Moblin SDK & win
>> > great
>> > prizes
>> > Grand prize is a trip for two to an Open Source event anywhere in the
>> > world
>> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > _______________________________________________
>> > Geoserver-users mailing list
>> > Geoserver-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
>> >
>> >
>>
>>
>>
>> --
>> -------------------------------------------------------
>> Eng. Simone Giannecchini
>> GeoSolutions S.A.S.
>> Owner - Software Engineer
>> Via Carignoni 51
>> 55041 Camaiore (LU)
>> Italy
>>
>> phone: +39 0584983027
>> fax: +39 0584983027
>> mob: +39 333 8128928
>>
>>
>> http://www.geo-solutions.it
>> http://www.geo-solutions.it/simone.giannecchini
>> http://www.linkedin.com/in/simonegiannecchini
>>
>> -------------------------------------------------------
>
>

--
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

--
-------------------------------------------------------
Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

Doing this the proper way and including in GUI would be nice, but wanted to raise the jpeg quality quickly in a production enviroment.

Perhaps later I’ll be confident enough with the code base to contribute this but for now thanks for confiming the quick fix.

/Björn

On Sun, Oct 5, 2008 at 11:12 PM, Simone Giannecchini <simboss1@…84…> wrote:

Ciao Bjorn,
if what you are looking for is a quick & dirty fix, what you describe
above would do what you need?
I thought you wanted the capability to this kind of stuff from the UI…

Simone.

On Sat, Oct 4, 2008 at 2:57 PM, Björn Harrtell <bjorn.harrtell@…84…> wrote:

Hmm first time looking at the gigantic source that makes up geotools and
geoserver I don’t understand much of “the hint to use non native jpeg writer
is implemented through the various layers.” :slight_smile:

But looking at JPEGMapProducer.java line 47:

new ImageWorker(image).writeJPEG(outStream, “JPEG”, 0.75f,
JPEGNativeAcc.booleanValue());

Wouldn’t a quick and dirty fix be to adjust the value, recompile and
replace?

/Björn

On Fri, Oct 3, 2008 at 6:48 PM, Simone Giannecchini <simboss1@…84…>
wrote:

Well,
actually, quite a few things would be involved at both the geotools
and geoserver level. It takes more time to explain it than to do it
:-).
Thinking…, you might want to track down how the hint to use non
native jpeg writer is implemented through the various layers. When you
get to the ImageWorker class in geotools, I’ll tell you how to change
writer settings.

Simone.

On Fri, Oct 3, 2008 at 6:35 PM, Björn Harrtell <bjorn.harrtell@…84…>
wrote:

Hehe, well I really need it :wink:

Seriously though, if this is a very low priority thing, we would like to
patch it ourselves. If you could point out the class that we need to
tinker
with it would be much appriciated.

/Björn

On Fri, Oct 3, 2008 at 6:30 PM, Simone Giannecchini <simboss1@…84…>
wrote:

Ciao Bjorn,
actually, you are right, there is no way to configure this. Default
quality is 75% (visually lossless).
It could be implemented quite easily though, but I guess it is the
kind of the thing that gets procrastined indefinitely unitl someone
really needs it :-).

Simone.

On Fri, Oct 3, 2008 at 6:24 PM, Björn Harrtell
<bjorn.harrtell@…84…>
wrote:

Hello,

I need to raise the jpeg quality when using it as output format for
WMS.
I’m
using geoserver 1.6.5 and, to my surprise, when looking around I
couldn’t
find any way to do this.

Is there a setting for this that I’m not seeing, or is it indeed a
missing
feature?

/Björn


This SF.Net email is sponsored by the Moblin Your Move Developer’s
challenge
Build the coolest Linux based applications with Moblin SDK & win
great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini


Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini



Eng. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://www.geo-solutions.it/simone.giannecchini
http://www.linkedin.com/in/simonegiannecchini