Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GIMP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,750
Issues
2,750
List
Boards
Labels
Service Desk
Milestones
Merge Requests
34
Merge Requests
34
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GIMP
Commits
698d9ea2
Commit
698d9ea2
authored
Aug 12, 2011
by
Martin Nordholts
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plug-ins: bmp-write.c: encoded -> use_run_length_encoding
parent
376ad788
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
plug-ins/file-bmp/bmp-write.c
plug-ins/file-bmp/bmp-write.c
+11
-11
No files found.
plug-ins/file-bmp/bmp-write.c
View file @
698d9ea2
...
...
@@ -53,7 +53,7 @@ typedef enum
static
struct
{
RGBMode
rgb_format
;
gint
encoded
;
gint
use_run_length_encoding
;
}
BMPSaveData
;
static
gint
cur_progress
=
0
;
...
...
@@ -64,7 +64,7 @@ static void write_image (FILE *f,
guchar
*
src
,
gint
width
,
gint
height
,
gint
encoded
,
gint
use_run_length_encoding
,
gint
channels
,
gint
bpp
,
gint
spzeile
,
...
...
@@ -245,8 +245,7 @@ WriteBMP (const gchar *filename,
g_assert_not_reached
();
}
/* Perhaps someone wants RLE encoded Bitmaps */
BMPSaveData
.
encoded
=
0
;
BMPSaveData
.
use_run_length_encoding
=
0
;
mask_info_size
=
0
;
if
(
!
interactive
&&
lastvals
)
...
...
@@ -342,7 +341,7 @@ WriteBMP (const gchar *filename,
Bitmap_Head
.
biPlanes
=
1
;
Bitmap_Head
.
biBitCnt
=
BitsPerPixel
;
if
(
BMPSaveData
.
encoded
==
0
)
if
(
BMPSaveData
.
use_run_length_encoding
==
0
)
{
if
(
mask_info_size
>
0
)
Bitmap_Head
.
biCompr
=
3
;
/* BI_BITFIELDS */
...
...
@@ -506,8 +505,9 @@ WriteBMP (const gchar *filename,
write_image
(
outfile
,
pixels
,
cols
,
rows
,
BMPSaveData
.
encoded
,
channels
,
BitsPerPixel
,
SpZeile
,
MapSize
,
BMPSaveData
.
rgb_format
);
BMPSaveData
.
use_run_length_encoding
,
channels
,
BitsPerPixel
,
SpZeile
,
MapSize
,
BMPSaveData
.
rgb_format
);
/* ... and exit normally */
...
...
@@ -544,7 +544,7 @@ write_image (FILE *f,
guchar
*
src
,
gint
width
,
gint
height
,
gint
encoded
,
gint
use_run_length_encoding
,
gint
channels
,
gint
bpp
,
gint
spzeile
,
...
...
@@ -645,7 +645,7 @@ write_image (FILE *f,
}
else
{
switch
(
encoded
)
/* now it gets more difficult */
switch
(
use_run_length_encoding
)
/* now it gets more difficult */
{
/* uncompressed 1,4 and 8 bit */
case
0
:
{
...
...
@@ -844,14 +844,14 @@ save_dialog (gint channels)
toggle
=
gtk_check_button_new_with_mnemonic
(
_
(
"_Run-Length Encoded"
));
gtk_box_pack_start
(
GTK_BOX
(
vbox_main
),
toggle
,
FALSE
,
FALSE
,
0
);
gtk_toggle_button_set_active
(
GTK_TOGGLE_BUTTON
(
toggle
),
BMPSaveData
.
encoded
);
BMPSaveData
.
use_run_length_encoding
);
gtk_widget_show
(
toggle
);
if
(
channels
>
1
)
gtk_widget_set_sensitive
(
toggle
,
FALSE
);
g_signal_connect
(
toggle
,
"toggled"
,
G_CALLBACK
(
gimp_toggle_button_update
),
&
BMPSaveData
.
encoded
);
&
BMPSaveData
.
use_run_length_encoding
);
expander
=
gtk_expander_new_with_mnemonic
(
_
(
"_Advanced Options"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment