Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
28002030
Commit
28002030
authored
Jan 14, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support transparency in iff images.
Fixes ticket #707. Reviewed-by: Peter Ross
parent
6ba74be5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
iff.c
libavcodec/iff.c
+4
-4
No files found.
libavcodec/iff.c
View file @
28002030
...
...
@@ -165,6 +165,9 @@ static int ff_cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
pal
[
i
]
=
0xFF000000
|
gray2rgb
((
i
*
255
)
>>
avctx
->
bits_per_coded_sample
);
}
}
if
(
s
->
masking
==
MASK_HAS_TRANSPARENT_COLOR
&&
s
->
transparency
<
1
<<
avctx
->
bits_per_coded_sample
)
pal
[
s
->
transparency
]
&=
0xFFFFFF
;
return
0
;
}
...
...
@@ -216,10 +219,7 @@ static int extract_header(AVCodecContext *const avctx,
s
->
flags
=
bytestream_get_byte
(
&
buf
);
s
->
transparency
=
bytestream_get_be16
(
&
buf
);
s
->
masking
=
bytestream_get_byte
(
&
buf
);
if
(
s
->
masking
==
MASK_HAS_TRANSPARENT_COLOR
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Transparency not supported
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
else
if
(
s
->
masking
!=
MASK_NONE
)
{
if
(
s
->
masking
!=
MASK_NONE
&&
s
->
masking
!=
MASK_HAS_TRANSPARENT_COLOR
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Masking not supported
\n
"
);
return
AVERROR_PATCHWELCOME
;
}
...
...
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