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
8b08f819
Commit
8b08f819
authored
Dec 01, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support transparency in 32bit bmp files.
parent
69035f3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bmp.c
libavcodec/bmp.c
+8
-2
No files found.
libavcodec/bmp.c
View file @
8b08f819
...
@@ -154,7 +154,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
...
@@ -154,7 +154,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
rgb
[
2
]
=
0
;
rgb
[
2
]
=
0
;
}
}
avctx
->
pix_fmt
=
PIX_FMT_BGR
24
;
avctx
->
pix_fmt
=
PIX_FMT_BGR
A
;
break
;
break
;
case
24
:
case
24
:
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
...
@@ -319,7 +319,13 @@ static int bmp_decode_frame(AVCodecContext *avctx,
...
@@ -319,7 +319,13 @@ static int bmp_decode_frame(AVCodecContext *avctx,
dst
[
0
]
=
src
[
rgb
[
2
]];
dst
[
0
]
=
src
[
rgb
[
2
]];
dst
[
1
]
=
src
[
rgb
[
1
]];
dst
[
1
]
=
src
[
rgb
[
1
]];
dst
[
2
]
=
src
[
rgb
[
0
]];
dst
[
2
]
=
src
[
rgb
[
0
]];
dst
+=
3
;
/* The Microsoft documentation states:
* "The high byte in each DWORD is not used."
* Both GIMP and ImageMagick store the alpha transparency value
* in the high byte for 32bit bmp files.
*/
dst
[
3
]
=
src
[
3
];
dst
+=
4
;
src
+=
4
;
src
+=
4
;
}
}
...
...
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