Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12559 > unrolled thread

Programs to convert *.xbm to *.gif for RHEL 6.5?

Started bySteve <tinker123@gmail.com>
First post2014-10-30 08:28 -0700
Last post2014-10-30 12:02 -0800
Articles 6 — 5 participants

Back to article view | Back to comp.os.linux.misc


Contents

  Programs to convert *.xbm to *.gif for RHEL 6.5? Steve <tinker123@gmail.com> - 2014-10-30 08:28 -0700
    Re: Programs to convert *.xbm to *.gif for RHEL 6.5? Rich <rich@example.invalid> - 2014-10-30 16:52 +0000
    Re: Programs to convert *.xbm to *.gif for RHEL 6.5? floyd@apaflo.com (Floyd L. Davidson) - 2014-10-30 09:41 -0800
      Q: graphicsmagick "Chester A. Arthur" <deadprez@whitehouse.com> - 2014-10-30 13:04 -0500
    Re: Programs to convert *.xbm to *.gif for RHEL 6.5? Robert Heller <heller@deepsoft.com> - 2014-10-30 12:53 -0500
      Re: Programs to convert *.xbm to *.gif for RHEL 6.5? floyd@apaflo.com (Floyd L. Davidson) - 2014-10-30 12:02 -0800

#12559 — Programs to convert *.xbm to *.gif for RHEL 6.5?

FromSteve <tinker123@gmail.com>
Date2014-10-30 08:28 -0700
SubjectPrograms to convert *.xbm to *.gif for RHEL 6.5?
Message-ID<abf4e2bf-57b7-4765-9e4b-49579ec4f7c1@googlegroups.com>
Hi,

I'm on RHEL 6.5

Can anyone suggest a program that will convert a directory full of *.xbm files to *.gif files?

Thank you

Steve

[toc] | [next] | [standalone]


#12560

FromRich <rich@example.invalid>
Date2014-10-30 16:52 +0000
Message-ID<m2tqce$680$1@dont-email.me>
In reply to#12559
Steve <tinker123@gmail.com> wrote:
> Hi,

> I'm on RHEL 6.5

> Can anyone suggest a program that will convert a directory full of
> *.xbm files to *.gif files?

The netpbm utilities and a "for" loop in bash.

[toc] | [prev] | [next] | [standalone]


#12561

Fromfloyd@apaflo.com (Floyd L. Davidson)
Date2014-10-30 09:41 -0800
Message-ID<871tppwj4g.fld@barrow.com>
In reply to#12559
Steve <tinker123@gmail.com> wrote:
>Hi,
>
>I'm on RHEL 6.5
>
>Can anyone suggest a program that will convert a directory full of *.xbm files to *.gif files?

If you don't have ImageMagick tools, download and install them.

Then you can do something like this:

   for x in *.xbm ; do convert "${x}" "${x%%xbm}gif" ; done

-- 
Floyd L. Davidson                         http://www.apaflo.com/
Ukpeagvik (Barrow, Alaska)                      floyd@apaflo.com

[toc] | [prev] | [next] | [standalone]


#12563 — Q: graphicsmagick

From"Chester A. Arthur" <deadprez@whitehouse.com>
Date2014-10-30 13:04 -0500
SubjectQ: graphicsmagick
Message-ID<a9qdndpUydMJ4M_JnZ2dnUU7-d-dnZ2d@posted.cavenetllc>
In reply to#12561
Can anyone enlighten me as to the difference between
Imagemagick and Graphicsmagick ? graphicsmagick.org
says it is multi-threaded, but does not give any
example of how one takes advantage of that. Seems to
me that processing a bunch of files (say xbm=>gif)
would be a good place to use that. Or did graphicsmagick
fork because of some developer catfight?

Inquiring minds would like to know.

[toc] | [prev] | [next] | [standalone]


#12562

FromRobert Heller <heller@deepsoft.com>
Date2014-10-30 12:53 -0500
Message-ID<v5udnYhmXaqz5s_JnZ2dnUU7-TudnZ2d@giganews.com>
In reply to#12559
At Thu, 30 Oct 2014 08:28:42 -0700 (PDT) Steve <tinker123@gmail.com> wrote:

> 
> Hi,
> 
> I'm on RHEL 6.5
> 
> Can anyone suggest a program that will convert a directory full of *.xbm files to *.gif files?
> 
> Thank you

Assumes you have done 'sudo yum install ImageMagick' first.

#!/bin/bash
for xbm in *.xbm ; do
   gif=`basename $xbm`.gif
   convert $xbm $gif
done

> 
> Steve
>                                                             

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller@deepsoft.com       -- Webhosting Services
                           

[toc] | [prev] | [next] | [standalone]


#12564

Fromfloyd@apaflo.com (Floyd L. Davidson)
Date2014-10-30 12:02 -0800
Message-ID<87wq7huy0l.fld@barrow.com>
In reply to#12562
Robert Heller <heller@deepsoft.com> wrote:
>At Thu, 30 Oct 2014 08:28:42 -0700 (PDT) Steve <tinker123@gmail.com> wrote:
>>
>> Hi,
>>
>> I'm on RHEL 6.5
>>
>> Can anyone suggest a program that will convert a directory full of *.xbm files to *.gif files?
>>
>> Thank you
>
>Assumes you have done 'sudo yum install ImageMagick' first.
>
>#!/bin/bash
>for xbm in *.xbm ; do
>   gif=`basename $xbm`.gif
>   convert $xbm $gif
>done

Do you really want to rename foobar.xbm to foobar.xbm.gif,
or should it be to foobar.gif?

The command "basename $xbm" in that context is a no op.
This will do what you want:

  gif="$(basename $xbm xbm)gif"

But, really, this is much better:

  gif="${xbm%%xbm}gif"

Hence, with an eye to defensive programming:

#!/bin/bash
for x in *.xbm ; do
   convert "${x}" "${x%%xbm}gif"
done


-- 
Floyd L. Davidson                         http://www.apaflo.com/
Ukpeagvik (Barrow, Alaska)                      floyd@apaflo.com

[toc] | [prev] | [standalone]


Back to top | Article view | comp.os.linux.misc


csiph-web