RSS/Atom feed Twitter
Site is read-only, email is disabled

newbie: script for comverting eps line drawings to gif

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

32 of 32 messages available
Toggle history

Please log in to manage your subscriptions.

newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 01:24
  newbie: script for comverting eps line drawings to gif Tőkés Ábel 20 Jan 07:30
  newbie: script for comverting eps line drawings to gif Ofnuts 20 Jan 11:06
   newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:40
    newbie: script for comverting eps line drawings to gif Ofnuts 20 Jan 23:26
     newbie: script for comverting eps line drawings to gif Ray Tayek 21 Jan 08:13
      newbie: script for comverting eps line drawings to gif Ofnuts 21 Jan 10:03
       newbie: script for comverting eps line drawings to gif Mike Williams 21 Jan 15:30
        newbie: script for comverting eps line drawings to gif Ofnuts 21 Jan 16:28
         newbie: script for comverting eps line drawings to gif Mike Williams 22 Jan 10:41
       newbie: script for comverting eps line drawings to gif Ray Tayek 22 Jan 09:38
        newbie: script for comverting eps line drawings to gif Ofnuts 22 Jan 10:47
         newbie: script for comverting eps line drawings to gif Ray Tayek 23 Jan 06:50
          newbie: script for comverting eps line drawings to gif Johan Vromans 23 Jan 12:48
           newbie: script for comverting eps line drawings to gif Ray Tayek 23 Jan 23:45
  newbie: script for comverting eps line drawings to gif Kevin Cozens 20 Jan 16:56
newbie: script for comverting eps line drawings to gif Chris Mohler 20 Jan 18:58
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
  newbie: script for converting eps line drawings to gif Ray Tayek 21 Jan 00:43
   newbie: script for converting eps line drawings to gif Mike Williams 21 Jan 01:58
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:41
  newbie: script for comverting eps line drawings to gif Kevin Cozens 21 Jan 04:44
   newbie: script for comverting eps line drawings to gif Ray Tayek 21 Jan 06:50
    newbie: script for comverting eps line drawings to gif Kevin Cozens 21 Jan 07:57
newbie: script for comverting eps line drawings to gif Ray Tayek 20 Jan 22:45
newbie: script for converting eps line drawings to gif Ray Tayek 21 Jan 06:53
newbie: script for converting eps line drawings to gif Ray Tayek 21 Jan 06:59
newbie: script for comverting eps line drawings to gif Ray Tayek 23 Jan 06:39
Ray Tayek
2011-01-20 01:24:18 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck.

i am a programmer, but i do not know lisp.

if i import an eps into gimp and save it as a gif, it look pretty good. but i need to convert hundreds of these.

can someone point me to some kind of starter script that would go throug the eps files in a directory and do the conversion.

any pointers will be appreciated.

thanks

--- co-chair http://ocjug.org/

Tőkés Ábel
2011-01-20 07:30:09 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck.

i am a programmer, but i do not know lisp.

if i import an eps into gimp and save it as a gif, it look pretty good. but i need to convert hundreds of these.

can someone point me to some kind of starter script that would go throug the eps files in a directory and do the conversion.

any pointers will be appreciated.

thanks

--- co-chair http://ocjug.org/

_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Try David's Batch Processor:
http://members.ozemail.com.au/~hodsond/dbp.html

It's really cool.

Abel

Ofnuts
2011-01-20 11:06:17 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 01/20/2011 02:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck.

i am a programmer, but i do not know lisp.

if i import an eps into gimp and save it as a gif, it look pretty good. but i need to convert hundreds of these.

can someone point me to some kind of starter script that would go throug the eps files in a directory and do the conversion.

any pointers will be appreciated.

thanks

Not with Gimp... this is the kind of work ImageMagick's convert is meant for. Might be as simple as:

convert image.eps image.gif

but you also have a very large set of options...

Kevin Cozens
2011-01-20 16:56:37 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck.

Install ImageMagick on your computer then you can use its "convert" program in a script to convert your images to the format you need.

Chris Mohler
2011-01-20 18:58:12 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On Wed, Jan 19, 2011 at 10:57 PM, Ray Tayek wrote:

oh, it's python (didn't know that gimp ate python).

i will try some python. don't see any python-fu under filters though.

are the conversion options documented anywhere?

Are you on Windows? You'll need to install python support for GIMP if so: http://gimp-win.sourceforge.net/faq.html

Most procedures can be found in the Procedure Browser - type 'eps' in the search field.

Also - I second the recommendation of David's Batch Processor, if you cannot get imagemagick to do the trick. That was the script whose name escaped me ;)

Chris

Ray Tayek
2011-01-20 22:40:53 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 03:06 AM 1/20/2011, you wrote:

On 01/20/2011 02:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck. ...

Not with Gimp... this is the kind of work ImageMagick's convert is meant for. Might be as simple as:

convert image.eps image.gif

but you also have a very large set of options...

yes, i tried a bunch of them at http://tayek.com/bobt/images/gif.html but none of them are very good

_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

---
co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:09 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 07:05 PM 1/19/2011, you wrote:

On Wed, Jan 19, 2011 at 7:24 PM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png) ... i am a programmer, but i do not know lisp.

This was one of the first hits I got for 'batch' and 'convert' at the plugin registry:
http://registry.gimp.org/node/5511

oh, it's python (didn't know that gimp ate python).

i will try some python. don't see any python-fu under filters though.

are the conversion options documented anywhere?

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:18 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 11:07 PM 1/19/2011, you wrote:

Ray Tayek writes:

if i import an eps into gimp and save it as a gif, it look pretty good. but i need to convert hundreds of these.

can someone point me to some kind of starter script that would go throug the eps files in a directory and do the conversion.

ImageMagick's convert tool would be a good choice.

i've been trying that. i tried all combinations of some of the these:

def csg="-colorspace gray" def c2="-colors 2"
def bw="-background white"
def d1="-depth 1"
def fl="-flatten"
def ao="-alpha off"

you can see the results here.

http://tayek.com/bobt/images/gif.html

none of them look as good as the gimp output.

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:28 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 12:46 AM 1/20/2011, you wrote:

Ray Tayek writes:

http://tayek.com/bobt/images/gif.html

Can you send me the eps, please?

sure, attached please find. page3 is one i did the testing on.

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:42 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 11:29 PM 1/19/2011, you wrote:

What are your problems with Imagemagick, which is exactly the tool you need?

i go some ideas from the image magic list and i tried a bunch of combinations of their suggestions. you can see what i tried at http://tayek.com/bobt/images/gif.html.

what happens is that the lines vary in thickness (or get eliminated) or they end up gray. i don't know how to tell image magick that this is a line drawing.

if i convert manually with gimp, i get a fair result.

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:52 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 11:30 PM 1/19/2011, you wrote:

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert ...

Try David's Batch Processor:
http://members.ozemail.com.au/~hodsond/dbp.html

It's really cool.

i will try this.

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:41:59 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 03:06 AM 1/20/2011, you wrote:

On 01/20/2011 02:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck. ...

Not with Gimp... this is the kind of work ImageMagick's convert is meant for. Might be as simple as:

convert image.eps image.gif

but you also have a very large set of options...

yes, i tried a bunch of them at http://tayek.com/bobt/images/gif.html but none of them are very good

_______________________________________________ Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

---
co-chair http://ocjug.org/

Ray Tayek
2011-01-20 22:45:01 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 10:58 AM 1/20/2011, Chris Mohler wrote:

On Wed, Jan 19, 2011 at 10:57 PM, Ray Tayek wrote:

oh, it's python (didn't know that gimp ate python).

i will try some python. don't see any python-fu under filters though.

are the conversion options documented anywhere?

Are you on Windows? You'll need to install python support for GIMP if so: http://gimp-win.sourceforge.net/faq.html

yes, i am on windows, thanks for the link.

Most procedures can be found in the Procedure Browser - type 'eps' in the search field.

Also - I second the recommendation of David's Batch Processor, if you cannot get imagemagick to do the trick. That was the script whose name escaped me ;)

i will look at that also.

thanks

--- co-chair http://ocjug.org/

Ofnuts
2011-01-20 23:26:35 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 01/20/2011 11:40 PM, Ray Tayek wrote:

At 03:06 AM 1/20/2011, you wrote:

On 01/20/2011 02:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert to gif (or png). i was trying to use image magic, but not having any luck. ...

Not with Gimp... this is the kind of work ImageMagick's convert is meant for. Might be as simple as:

convert image.eps image.gif

but you also have a very large set of options...

yes, i tried a bunch of them at http://tayek.com/bobt/images/gif.html but none of them are very good

All of them produce an image with less pixels than the conversion in Gimp... (235x235 instead of 326x326).

If you look at the EPS it specifies a 235x235 bounding box, and a scale factor to shoehorn the diagram in it. If you edit the EPS to work with a 1:1 scale and a sufficient bounding box (2 lines to edit, no hard to script), the output of convert is OK. You can likely ask convert to scale down the graphic at that point and get correct results, scaling is always best done as the last thing in the process.

Ray Tayek
2011-01-21 00:43:03 UTC (about 14 years ago)

newbie: script for converting eps line drawings to gif

At 02:41 PM 1/20/2011, Ray Tayek wrote:

At 11:30 PM 1/19/2011, you wrote:

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert ...

Try David's Batch Processor:
http://members.ozemail.com.au/~hodsond/dbp.html

It's really cool.

i will try this.

this plugin seems a bit tricky to use.

but i did get one fairly good set of results specifying enable and convert to gray in the color tab.

the results are here: http://tayek.com/bobt/images/gimp/dbp.html

thanks

--- co-chair http://ocjug.org/

Mike Williams
2011-01-21 01:58:31 UTC (about 14 years ago)

newbie: script for converting eps line drawings to gif

On Thu, Jan 20, 2011 at 7:43 PM, Ray Tayek wrote:

At 02:41 PM 1/20/2011, Ray Tayek wrote:

At 11:30 PM 1/19/2011, you wrote:

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert ...

You may want to consider Ghostscript.

This was done on linux with the following command and ghostscript

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngmono -r100 -dDEVICEWIDTHPOINTS=234 -dDEVICEHEIGHTPOINTS=234 -sOutputFile=$2.png $1.eps

http://watson.bio.whe.umb.edu/images/page4.png

Mike

Kevin Cozens
2011-01-21 04:44:31 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

Ray Tayek wrote:

yes, i tried a bunch of them at http://tayek.com/bobt/images/gif.html but none of them are very good

There is a problem with the set of sample conversions. The image produced by GIMP which is supposedly the "good" version of the image is larger than the other samples you show. If you can provide a link to the original eps file it would be possible to verify the expected look of the image using ghostscript.

I have a strong suspicion that the "good" image you obtained using GIMP may not be an accurate representation of the original source file. If GIMP is producing the wrong output that is another matter that can only be checked and/or fixed with the original eps file.

Ray Tayek
2011-01-21 06:50:27 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 08:44 PM 1/20/2011, you wrote:

Ray Tayek wrote:

yes, i tried a bunch of them at http://tayek.com/bobt/images/gif.html but none of them are very good

There is a problem with the set of sample conversions. The image produced by GIMP which is supposedly the "good" version of the image is larger than the other samples you show. If you can provide a link to the original eps file it would be possible to verify the expected look of the image using ghostscript.

i put one here: http://tayek.com/bobt/images/page3.eps

I have a strong suspicion that the "good" image you obtained using GIMP may not be an accurate representation of the original source file. ..

yes. someone else has also pointed this out.

i did use daves batch thing for gimp on a bunch of eps files and got some fair results. you can see them here: http://tayek.com/bobt/images/gimp/dbp.html

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-21 06:53:40 UTC (about 14 years ago)

newbie: script for converting eps line drawings to gif

At 05:58 PM 1/20/2011, Mike Williams wrote:

On Thu, Jan 20, 2011 at 7:43 PM, Ray Tayek wrote:
At 02:41 PM 1/20/2011, Ray Tayek wrote:

At 11:30 PM 1/19/2011, you wrote:

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert ...

You may want to consider Ghostscript.

This was done on linux with the following command and ghostscript

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngmono -r100 -dDEVICEWIDTHPOINTS=234 -dDEVICEHEIGHTPOINTS=234 -sOutputFile=$2.png $1.eps

http://watson.bio.whe.umb.edu/images/page4.png

that's fairly nice. i may persued this. i have a few thousand images and they are in different sizes and scales. some of them have been inserted into m$ word and pdf docs and then exported.

i am working on some scripts that will fool around with different bunches of them.

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-21 06:59:47 UTC (about 14 years ago)

newbie: script for converting eps line drawings to gif

At 04:51 PM 1/20/2011, Ofnuts wrote:

On 01/21/2011 01:43 AM, Ray Tayek wrote:

At 02:41 PM 1/20/2011, Ray Tayek wrote:

At 11:30 PM 1/19/2011, you wrote:

On 1/20/2011 2:24 AM, Ray Tayek wrote:

hi, i have a lot of eps files that i need to convert ...

Try David's Batch Processor:
http://members.ozemail.com.au/~hodsond/dbp.html ...

i will try this.

this plugin seems a bit tricky to use.

but i did get one fairly good set of results specifying enable and convert to gray in the color tab.

the results are here: http://tayek.com/bobt/images/gimp/dbp.html

Even better results from convert if you fix the EPS first... These are the result of a plain:

convert page3b.eps page3b.gif

this is really nice.

but it needs to be flattened (i think - works in mail, but is black in previewer)

i will work on some scripts that will give me the info to perhaps fix the eps.

thanks

--- co-chair http://ocjug.org/

Kevin Cozens
2011-01-21 07:57:45 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

Ray Tayek wrote:

i put one here: http://tayek.com/bobt/images/page3.eps

I looked at the contents of the source file. Ignoring the scaling factor in the image, all lines are 0.8 points with the exception of the outside border which has a width of 1.92 points.

You can see the thicker border when the image is viewed with the ghostscript viewer program, gv. If the conversion from eps to something else doesn't produce an image with slightly thicker outside borders than the rest of the horizontal and vertical lines, you aren't getting a true view of the image.

Any discrepancy could be due to a number of factor. Bugs in the code, for a start, or the size of the output image may be insufficient to allow you to see the different line widths.

What might also be affecting image quality when using convert are options such as anti-aliasing. I just generated a 400x400 pixel image and the quality of the lines was not what I was expecting. Possibly a case of a program trying to be too helpful.

http://tayek.com/bobt/images/gimp/dbp.html

Hm... I'm starting to think these images have something to do with learning strategy for Go.

Ray Tayek
2011-01-21 08:13:44 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 03:26 PM 1/20/2011, Ofnuts wrote:

...
All of them produce an image with less pixels than the conversion in Gimp... (235x235 instead of 326x326).

If you look at the EPS it specifies a 235x235 bounding box, and a scale factor to shoehorn the diagram in it.

the page.eps file that i am using has: %%BoundingBox: -1 -1 234 234 and identify says both the eps and convert gif are 235 by 235. gimp says the eps is 236 by 236 when i import it.

If you edit the EPS to work with a 1:1 scale and a sufficient bounding box (2 lines to edit, no hard to script), the output of convert is OK.

what should the values be for bounding box?

can you show me the values that you used and the convert command that had the great result?

thanks

--- co-chair http://ocjug.org/

Ofnuts
2011-01-21 10:03:46 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 01/21/2011 09:13 AM, Ray Tayek wrote:

At 03:26 PM 1/20/2011, Ofnuts wrote:

...
All of them produce an image with less pixels than the conversion in Gimp... (235x235 instead of 326x326).

If you look at the EPS it specifies a 235x235 bounding box, and a scale factor to shoehorn the diagram in it.

the page.eps file that i am using has: %%BoundingBox: -1 -1 234 234 and identify says both the eps and convert gif are 235 by 235. gimp says the eps is 236 by 236 when i import it.

If you edit the EPS to work with a 1:1 scale and a sufficient bounding box (2 lines to edit, no hard to script), the output of convert is OK.

what should the values be for bounding box?

current bounding box size/current scaling factor=235/.47166=498,24 (I used 500)

can you show me the values that you used and the convert command that had the great result?

Already sent you the fixed EPS (page3b.eps)

I used a plain: "convert page3b.eps page3b.gif" (no parameters whatsoever)

Mike Williams
2011-01-21 15:30:31 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On Fri, Jan 21, 2011 at 5:03 AM, Ofnuts wrote:

On 01/21/2011 09:13 AM, Ray Tayek wrote:

At 03:26 PM 1/20/2011, Ofnuts wrote:

...
If you edit the EPS to work with a
1:1 scale and a sufficient bounding box (2 lines to edit, no hard to script), the output of convert is OK.

what should the values be for bounding box?

current bounding box size/current scaling factor=235/.47166=498,24 (I used 500)

can you show me the values that you used and the convert command that had the great result?

Already sent you the fixed EPS (page3b.eps)

Would someone please post the differences between page3.eps and page3b.eps?

I tried changing scale to 1.0 1.0 and get an image with a thicker outer border, but the image is clipped, only the lower left corner of the figure is shown and the images is about 300x300 - tried changing the bounding box. That did not help.

Mike

Ofnuts
2011-01-21 16:28:51 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 01/21/2011 04:30 PM, Mike Williams wrote:

Would someone please post the differences between page3.eps and page3b.eps?

I tried changing scale to 1.0 1.0 and get an image with a thicker outer border, but the image is clipped, only the lower left corner of the figure is shown and the images is about 300x300 - tried changing the bounding box. That did not help.

diff page3.eps page3b.eps
2c2
< %%BoundingBox: -1 -1 234 234
---
> %%BoundingBox: 0 0 500 500
17c17
< 0.47166 0.47166 scale
---
> 1 1 scale

Ray Tayek
2011-01-22 09:38:22 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

At 02:03 AM 1/21/2011, you wrote:

On 01/21/2011 09:13 AM, Ray Tayek wrote:

what should the values be for bounding box?

current bounding box size/current scaling factor=235/.47166=498,24 (I used 500)

i understand that.

what about a bounding box like: %%BoundingBox: -1 -21 101 214

would this need some kind of translate or something?

can you show me the values that you used and the convert command that

had the great result?

Already sent you the fixed EPS (page3b.eps)

yes. i got that from my mail folder.

I used a plain: "convert page3b.eps page3b.gif" (no parameters whatsoever)

displaying this in my email reader (eudora), it looks great. in a browser it looks great.

viewing with picasa shows a black background, gimp shows a checkerboard.

i put some examples of this here: http://tayek.com/bobt/images/ofnuts/

thanks

--- co-chair http://ocjug.org/

Mike Williams
2011-01-22 10:41:29 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On Fri, Jan 21, 2011 at 11:28 AM, Ofnuts wrote:

On 01/21/2011 04:30 PM, Mike Williams wrote:

Would someone please post the differences between page3.eps and

page3b.eps?

diff page3.eps page3b.eps

2c2

< %%BoundingBox: -1 -1 234 234 ---

%%BoundingBox: 0 0 500 500

17c17
< 0.47166 0.47166 scale
---

1 1 scale

I played with this a bit with ghostscript after gettting the changes for page3b.eps

It turned out that my problem was the command line parameters for ghostscript were overriding what was in the eps file. After I got that sorted out I noticed that the horizontal lines of the outer border were thinner that the vertical lines. I think was due to using a single number for -r and not having square pixels.

http://watson.bio.whe.umb.edu/images/page3b12.png

One more change to the command line args fixed that problem, at least on my screen.

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngmono -r91.8456X97.5238 -dDEVICEWIDTHPOINTS=500 -dDEVICEHEIGHTPOINTS=500 -sOutputFile=$2.png $1.eps

http://watson.bio.whe.umb.edu/images/page3b13.png

Mike

Ofnuts
2011-01-22 10:47:26 UTC (about 14 years ago)

newbie: script for comverting eps line drawings to gif

On 01/22/2011 10:38 AM, Ray Tayek wrote:

At 02:03 AM 1/21/2011, you wrote:

On 01/21/2011 09:13 AM, Ray Tayek wrote:

what should the values be for bounding box?

current bounding box size/current scaling factor=235/.47166=498,24 (I used 500)

i understand that.

what about a bounding box like: %%BoundingBox: -1 -21 101 214

would this need some kind of translate or something?

can you show me the values that you used and the convert command that

had the great result?

Already sent you the fixed EPS (page3b.eps)

yes. i got that from my mail folder.

I used a plain: "convert page3b.eps page3b.gif" (no parameters whatsoever)

displaying this in my email reader (eudora), it looks great. in a browser it looks great.

viewing with picasa shows a black background, gimp shows a checkerboard.

Very likely because by default it is a transparent GIF (btw, IMHO PNG is much better than GIF). Convert must have an option to set a background. But if you use the images in a web site, you can leave them that way, and have the HTML display them over a go-ban picture (or any wooden pattern).

(side note: at that point GIMP is no longer involved, so I'm wondering if this can can continue on the Gimp-user list).

Ray Tayek
2011-01-23 06:39:53 UTC (almost 14 years ago)

newbie: script for comverting eps line drawings to gif

At 02:41 AM 1/22/2011, Mike Williams wrote:

On Fri, Jan 21, 2011 at 11:28 AM, Ofnuts wrote:

< %%BoundingBox: -1 -1 234 234 ---

%%BoundingBox: 0 0 500 500

17c17
< 0.47166 0.47166 scale
---

1 1 scale

I played with this a bit with ghostscript after gettting the changes for page3b.eps

It turned out that my problem was the command line parameters for ghostscript were overriding what was in the eps file. After I got that sorted out I noticed that the horizontal lines of the outer border were thinner that the vertical lines. I think was due to using a single number for -r and not having square pixels.

http://watson.bio.whe.umb.edu/images/page3b12.png

this looks great!

One more change to the command line args fixed that problem, at least on my screen.

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngmono -r91.8456X97.5238 -dDEVICEWIDTHPOINTS=500 -dDEVICEHEIGHTPOINTS=500 -sOutputFile=$2.png $1.eps

http://watson.bio.whe.umb.edu/images/page3b13.png

it's hard to see any difference in the two (i have poor vision).

i have ghostscript (for windoze). the viewer does a good job also.

i want to do some experiments with gs. can you please send me some of your scripts. (i can use cygwin or groovy to do scripting).

thanks

--- co-chair http://ocjug.org/

Ray Tayek
2011-01-23 06:50:43 UTC (almost 14 years ago)

newbie: script for comverting eps line drawings to gif

At 02:47 AM 1/22/2011, you wrote:

On 01/22/2011 10:38 AM, Ray Tayek wrote:

At 02:03 AM 1/21/2011, you wrote:

...

I used a plain: "convert page3b.eps page3b.gif" (no parameters whatsoever)

displaying this in my email reader (eudora), it looks great. in a browser it looks great.

viewing with picasa shows a black background, gimp shows a checkerboard.

Very likely because by default it is a transparent GIF (btw, IMHO PNG is much better than GIF).

i picked png because they looked the same to me (i have poor vision) and the gif was smaller.

(side note: at that point GIMP is no longer involved, so I'm wondering if this can can continue on the Gimp-user list).

i agree. this looks like ghostscript is what i should be fooling around with.

i looked for gs mailing lists, but just found these: http://ghostscript.com/mailman/listinfo/ - it doesn't look like the is a mailing list for users :)

thanks to all for your help.

--- co-chair http://ocjug.org/

Johan Vromans
2011-01-23 12:48:48 UTC (almost 14 years ago)

newbie: script for comverting eps line drawings to gif

Ray Tayek writes:

i agree. this looks like ghostscript is what i should be fooling around with.

You need antialiasing. Use explicit settings on the command line, e.g.,

-dTextAlphaBits=4 -dGraphicsAlphaBits=4

Why not use the tool I sent you?

-- Johan

Ray Tayek
2011-01-23 23:45:18 UTC (almost 14 years ago)

newbie: script for comverting eps line drawings to gif

At 04:48 AM 1/23/2011, you wrote:

Ray Tayek writes:

i agree. this looks like ghostscript is what i should be fooling around with.

You need antialiasing. Use explicit settings on the command line, e.g.,

-dTextAlphaBits=4 -dGraphicsAlphaBits=4

Why not use the tool I sent you?

-- Johan

i tried. i am on windows. don't know perl.

i tried strawberry perl and pointing to my gswin32.exe, i get a window from my $gs = `D:/bin/gs/gs9.00/bin/gswin32.exe --help`;

trying cygwin with gs, gets some test failures (please see attached file)

thanks

--- co-chair http://ocjug.org/