Re: [Gimp-user] newbie: script for comverting eps line drawings to gif
At 04:48 AM 1/23/2011, you wrote: Ray Tayek rta...@ca.rr.com 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/ Script started on Sun Jan 23 15:42:31 2011 .bashrc ]0;/cygdrive/d/dev/eps2png-2.7 [32mray@p5gc-mx [33m/cygdrive/d/dev/eps2png-2.7[0m $ make test PERL_DL_NONLAZY=1 /usr/bin/perl.exe -MExtUtils::Command::MM -e test_harness(0, 'blib/lib', 'blib/arch') t/*.t t/eps2gif.t .. t/eps2gif.t .. 1/5 sh: ppmtogif: command not found Problem creating t/x1.out for t/x1.eps # Looks like you planned 5 tests but ran 1. # Looks like your test exited with 1 just after 1. t/eps2gif.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 4/5 subtests t/eps2jpg.t .. t/eps2jpg.t .. 1/5 t/eps2jpg.t .. ok t/eps2png.t .. t/eps2png.t .. 1/5 t/eps2png.t .. ok t/extra.t t/extra.t 1/20 t/extra.t ok Test Summary Report --- t/eps2gif.t (Wstat: 256 Tests: 1 Failed: 0) Non-zero exit status: 1 Parse errors: Bad plan. You planned 5 tests but ran 1. Files=4, Tests=31, 2 wallclock secs ( 0.05 usr 0.01 sys + 1.22 cusr 0.78 csys = 2.06 CPU) Result: FAIL Failed 1/4 test programs. 0/31 subtests failed. make: *** [test_dynamic] Error 255 ]0;/cygdrive/d/dev/eps2png-2.7 [32mray@p5gc-mx [33m/cygdrive/d/dev/eps2png-2.7[0m $ exit Script done on Sun Jan 23 15:42:42 2011 ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] newbie: script for comverting eps line drawings to gif
At 11:07 PM 1/19/2011, you wrote: Ray Tayek rta...@ca.rr.com 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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 rta...@ca.rr.com 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] newbie: script for comverting eps line drawings to gif
At 12:46 AM 1/20/2011, you wrote: Ray Tayek rta...@ca.rr.com 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/ page3.eps Description: PostScript document ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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 rta...@ca.rr.com 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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 mailto:rta...@ca.rr.comrta...@ca.rr.com 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.pnghttp://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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
Re: [Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user
[Gimp-user] 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/ ___ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user