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,756
Issues
2,756
List
Boards
Labels
Service Desk
Milestones
Merge Requests
36
Merge Requests
36
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
8b296873
Commit
8b296873
authored
Mar 26, 2012
by
Alexis Wilhelm
Committed by
Michael Schumacher
Dec 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 637413 - Saving indexed png with transparency removes one unused color from the colormap
parent
1e99b12a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
plug-ins/common/file-png.c
plug-ins/common/file-png.c
+9
-9
No files found.
plug-ins/common/file-png.c
View file @
8b296873
...
...
@@ -2168,15 +2168,9 @@ find_unused_ia_color (GeglBuffer *buffer,
if
(
trans_used
==
FALSE
)
return
-
1
;
for
(
i
=
0
;
i
<
*
colors
;
i
++
)
{
if
(
ix_used
[
i
]
==
FALSE
)
return
i
;
}
/* Couldn't find an unused color index within the number of
bits per pixel we wanted. Will have to increment the number
of colors in the image and assign a transparent pixel there. */
/* If there is still some room at the end of the palette, increment
* the number of colors in the image and assign a transparent pixel
* there. */
if
((
*
colors
)
<
256
)
{
(
*
colors
)
++
;
...
...
@@ -2184,6 +2178,12 @@ find_unused_ia_color (GeglBuffer *buffer,
return
(
*
colors
)
-
1
;
}
for
(
i
=
0
;
i
<
*
colors
;
i
++
)
{
if
(
ix_used
[
i
]
==
FALSE
)
return
i
;
}
return
-
1
;
}
...
...
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