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

Script which convert XCF to BMP 24 bits

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Script which convert XCF to BMP 24 bits spam.spam.spam.spam@free.fr 08 Aug 19:14
  Script which convert XCF to BMP 24 bits peter kostov 09 Aug 15:37
spam.spam.spam.spam@free.fr
2010-08-08 19:14:15 UTC (over 14 years ago)

Script which convert XCF to BMP 24 bits

Hello,

I am writing a GIMP script which convert a XCF file to a BMP 24 bits file (merging all the layers).
The problem is : the output file is a BMP 32 bits (I want a BMP 24 bits).

I found a procedure which give me the type : gimp-drawable-type
It gives 0 when 24 bits and 1 when 32 bits.

But I don't found a procedure which set the type...

Can you tell me how I can save my BMP into 24 bits file?

Thank you a lot.

---

This is my script :

(define (xcf-bmp
input
output
)
(let*
(
(image
(car
(gimp-xcf-load
RUN-NONINTERACTIVE
input
input
)
)
)
(drawable
(car
(gimp-image-get-active-drawable image
)
)
)
)
(gimp-image-merge-visible-layers
image
0
)
(let*
(
(newdrawable
(car
(gimp-image-get-active-drawable image
)
)
)
)
(file-bmp-save
RUN-NONINTERACTIVE
image
newdrawable
output
output
)
)
)
)

peter kostov
2010-08-09 15:37:43 UTC (over 14 years ago)

Script which convert XCF to BMP 24 bits

On 08/08/2010 08:14 PM, spam.spam.spam.spam@free.fr wrote:

Hello,

I am writing a GIMP script which convert a XCF file to a BMP 24 bits file (merging all the layers).
The problem is : the output file is a BMP 32 bits (I want a BMP 24 bits).

I found a procedure which give me the type : gimp-drawable-type
It gives 0 when 24 bits and 1 when 32 bits.

But I don't found a procedure which set the type...

Can you tell me how I can save my BMP into 24 bits file?

Thank you a lot.

---

This is my script :

(define (xcf-bmp
input
output
)
(let*
(
(image
(car
(gimp-xcf-load
RUN-NONINTERACTIVE
input
input
)
)
)
(drawable
(car
(gimp-image-get-active-drawable image
)
)
)
)
(gimp-image-merge-visible-layers
image
0
)
(let*
(
(newdrawable
(car
(gimp-image-get-active-drawable image
)
)
)
)
(file-bmp-save
RUN-NONINTERACTIVE
image
newdrawable
output
output
)
)
)
)