For a web page, I make pictures of graphs. I produce them
as eps files, but want them on the web page as jpg. So I
read each picture in with the gimp, and save it as jpg. This
is a bit cumbersome. So:
Is there a Linux command for the conversion, as for example
epstopdf?
Failing that, can I do all this with typed-in commands? If
so, I could put them into a shell script. It would start
with
Dieter Britz wrote:
> For a web page, I make pictures of graphs. I produce them
> as eps files, but want them on the web page as jpg. So I
> read each picture in with the gimp, and save it as jpg. This
> is a bit cumbersome. So:
> Is there a Linux command for the conversion, as for example
> epstopdf?
> Failing that, can I do all this with typed-in commands? If
> so, I could put them into a shell script. It would start
> with
Dieter Britz <dieterhansbr...@gmail.com> wrote:
>For a web page, I make pictures of graphs. I produce them
>as eps files, but want them on the web page as jpg. So I
>read each picture in with the gimp, and save it as jpg. This
>is a bit cumbersome. So:
ImageMagick tools are the best way to accomplish that task, but
there are some tricks to getting good results...
The depth option is not actually necessary with conversion to a
JPEG output, but I've left it there because that command line is
generic for any output format. Change foo.jpg to foo.tif and it
produces a TIFF formatted output file.
The value for -density can be adjusted for the quality your
image requires. For example, 72 will produce very crude
results, 150 will be "draft" mode, 300 is good, and 600 ppi is
high quality. The resulting file size goes up slightly, and the
processing time is significantly increased.
On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>For a web page, I make pictures of graphs. I produce them as eps files,
>>but want them on the web page as jpg. So I read each picture in with the
>>gimp, and save it as jpg. This is a bit cumbersome. So:
> ImageMagick tools are the best way to accomplish that task, but there
> are some tricks to getting good results...
> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>For a web page, I make pictures of graphs. I produce them as eps files,
>>>but want them on the web page as jpg. So I read each picture in with the
>>>gimp, and save it as jpg. This is a bit cumbersome. So:
>> ImageMagick tools are the best way to accomplish that task, but there
>> are some tricks to getting good results...
unruh <un...@invalid.ca> wrote:
>On 2012-10-17, Dieter Britz <dieterhansbr...@gmail.com> wrote:
>> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>For a web page, I make pictures of graphs. I produce them as eps files,
>>>>but want them on the web page as jpg. So I read each picture in with the
>>>>gimp, and save it as jpg. This is a bit cumbersome. So:
>>> ImageMagick tools are the best way to accomplish that task, but there
>>> are some tricks to getting good results...
>> and the jpg, when on the web page, is HUGE. How do I control
>> the size?
>Well, you told it to make a HUGE picture. 3840? 360dpi?
Yep, exactly! As might be imagined, the -resize option
sets the pixel dimensions of the image. It's going to
make an image that is 3840 pixels across (and the
vertical dimension will be scaled to match).
That isn't really a "huge" image, it's merely 10-2/3"
across if printed. Of course if you display it in a web
browser with a window that is 800 pixels across, it will
be HUGE.
On Wed, 17 Oct 2012 08:23:41 -0800, Floyd L. Davidson wrote:
> unruh <un...@invalid.ca> wrote:
>>On 2012-10-17, Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>>>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>>For a web page, I make pictures of graphs. I produce them as eps
>>>>>files, but want them on the web page as jpg. So I read each picture
>>>>>in with the gimp, and save it as jpg. This is a bit cumbersome. So:
>>>> ImageMagick tools are the best way to accomplish that task, but there
>>>> are some tricks to getting good results...
>>> and the jpg, when on the web page, is HUGE. How do I control the size?
>>Well, you told it to make a HUGE picture. 3840? 360dpi?
> Yep, exactly! As might be imagined, the -resize option sets the pixel
> dimensions of the image. It's going to make an image that is 3840
> pixels across (and the vertical dimension will be scaled to match).
> That isn't really a "huge" image, it's merely 10-2/3" across if printed.
> Of course if you display it in a web browser with a window that is 800
> pixels across, it will be HUGE.
On Wed, 17 Oct 2012 08:23:41 -0800, Floyd L. Davidson wrote:
> unruh <un...@invalid.ca> wrote:
>>On 2012-10-17, Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>>>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>>For a web page, I make pictures of graphs. I produce them as eps
>>>>>files, but want them on the web page as jpg. So I read each picture
>>>>>in with the gimp, and save it as jpg. This is a bit cumbersome. So:
>>>> ImageMagick tools are the best way to accomplish that task, but there
>>>> are some tricks to getting good results...
>>> and the jpg, when on the web page, is HUGE. How do I control the size?
>>Well, you told it to make a HUGE picture. 3840? 360dpi?
> Yep, exactly! As might be imagined, the -resize option sets the pixel
> dimensions of the image. It's going to make an image that is 3840
> pixels across (and the vertical dimension will be scaled to match).
> That isn't really a "huge" image, it's merely 10-2/3" across if printed.
> Of course if you display it in a web browser with a window that is 800
> pixels across, it will be HUGE.
OK, thanks. There is one problem though. Here is a description of what I have tried: http:/www.dieterbritz.dk/foo/
How can I do this in one step, e.g. using convert? Why does it trim?
Sorry to belabour this, and I realise this is no longer a gimp
question.
-- Dieter Britz
Dieter Britz <dieterhansbr...@gmail.com> wrote:
>On Wed, 17 Oct 2012 08:23:41 -0800, Floyd L. Davidson wrote:
>> unruh <un...@invalid.ca> wrote:
>>>On 2012-10-17, Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>>>>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>>>For a web page, I make pictures of graphs. I produce them as eps
>>>>>>files, but want them on the web page as jpg. So I read each picture
>>>>>>in with the gimp, and save it as jpg. This is a bit cumbersome. So:
>>>>> ImageMagick tools are the best way to accomplish that task, but there
>>>>> are some tricks to getting good results...
>>>> and the jpg, when on the web page, is HUGE. How do I control the size?
>>>Well, you told it to make a HUGE picture. 3840? 360dpi?
>> Yep, exactly! As might be imagined, the -resize option sets the pixel
>> dimensions of the image. It's going to make an image that is 3840
>> pixels across (and the vertical dimension will be scaled to match).
>> That isn't really a "huge" image, it's merely 10-2/3" across if printed.
>> Of course if you display it in a web browser with a window that is 800
>> pixels across, it will be HUGE.
>OK, thanks. There is one problem though. Here is a description of what I
>have tried: http:/www.dieterbritz.dk/foo/
>How can I do this in one step, e.g. using convert? Why does it trim?
It could be a typo, but I'm betting the command lines you show on the
web page are an accurate cut and paste of the ones you tried:
One problem with *not* having that as "-type truecolor"
would be some parts of the image going black, just as
yours is showing up. I would expect you also get an
error message about there not being a file named
"truecolor" though...
If that is not the cause, if you can put the sub.eps
file on your web page where I can download it I can see
what I get and probably work out a way to do the right
thing in one shot.
>Sorry to belabour this, and I realise this is no longer a gimp
>question.
On Fri, 19 Oct 2012 01:44:06 -0800, Floyd L. Davidson wrote:
> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>On Wed, 17 Oct 2012 08:23:41 -0800, Floyd L. Davidson wrote:
>>> unruh <un...@invalid.ca> wrote:
>>>>On 2012-10-17, Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>> On Sun, 14 Oct 2012 09:32:46 -0800, Floyd L. Davidson wrote:
>>>>>> Dieter Britz <dieterhansbr...@gmail.com> wrote:
>>>>>>>For a web page, I make pictures of graphs. I produce them as eps
>>>>>>>files, but want them on the web page as jpg. So I read each picture
>>>>>>>in with the gimp, and save it as jpg. This is a bit cumbersome. So:
>>>>>> ImageMagick tools are the best way to accomplish that task, but
>>>>>> there are some tricks to getting good results...
>>>>> and the jpg, when on the web page, is HUGE. How do I control the
>>>>> size?
>>>>Well, you told it to make a HUGE picture. 3840? 360dpi?
>>> Yep, exactly! As might be imagined, the -resize option sets the pixel
>>> dimensions of the image. It's going to make an image that is 3840
>>> pixels across (and the vertical dimension will be scaled to match).
>>> That isn't really a "huge" image, it's merely 10-2/3" across if
>>> printed.
>>> Of course if you display it in a web browser with a window that is
>>> 800
>>> pixels across, it will be HUGE.
>>OK, thanks. There is one problem though. Here is a description of what I
>>have tried: http:/www.dieterbritz.dk/foo/
>>How can I do this in one step, e.g. using convert? Why does it trim?
> It could be a typo, but I'm betting the command lines you show on the
> web page are an accurate cut and paste of the ones you tried:
> One problem with *not* having that as "-type truecolor"
> would be some parts of the image going black, just as yours is showing
> up. I would expect you also get an error message about there not being
> a file named "truecolor" though...
> If that is not the cause, if you can put the sub.eps file on your web
> page where I can download it I can see what I get and probably work out
> a way to do the right thing in one shot.
>>Sorry to belabour this, and I realise this is no longer a gimp question.
> That's okay. This is just as good a place as any!
Sorry, you were right, I had missed the -type bit. With it, it
now works fine. Thanks!
It makes a difference with ImageMagick tools where an option is at on the
command line. While the first example above works, it turns out that if
certain other options are added in, it won't work unless the -type option
comes before the input file.
And that becomes important... when you want to try this one on for size:
convert -type truecolor -units PixelsPerInch \
-density 1000 \ # much finer lines and text
sub.eps \
-depth 32 \ # better precision
-gamma 0.454545 \ # remove gamma correction
-resize 400 \ # now resize the image
-gamma 2.2 \ # restore gamma correction
-depth 8 \ # back to 8-bit depth
-unsharp 1.5x1+0.7+0.02 \ # sharpen tone edges
-quality 90 \
sub2.jpg
This is more customized to what you are doing. Setting
the density to a relatively high value (600 or more)
results in much finer lines and text. The bit depth
gets changed to 32 and the gamma correction is removed
before the resize operation is done, and then the gamma
and bit depth are restored after the resize is finished.
That makes a significant difference in the precision
with which some images are resized. (On most images it
probably is not visible.) Then a little Unsharp Mask is
used to increase contrast at tonal edges. Depending on
your exact application you might want to use a
significantly greater amount of USM.