Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
itdan3344
stb
提交
3557e663
S
stb
项目概览
itdan3344
/
stb
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
stb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3557e663
编写于
6月 06, 2014
作者:
S
Sean Barrett
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix accidental rename of 'skip'
上级
47a34c17
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
11 deletion
+8
-11
stb_image.h
stb_image.h
+8
-11
未找到文件。
stb_image.h
浏览文件 @
3557e663
...
...
@@ -26,17 +26,13 @@
- overridable dequantizing-IDCT, YCbCr-to-RGB conversion (define STBI_SIMD)
Latest revisions:
1.38 (2014-06-06) suppress MSVC run-time warnings
1.38 (2014-06-06) suppress MSVC run-time warnings
, fix accidental rename of 'skip'
1.37 (2014-06-04) remove duplicate typedef
1.36 (2014-06-03) converted to header file, allow reading incorrect iphoned-images without iphone flag
1.35 (2014-05-27) warnings, bugfixes, TGA optimization, etc
1.34 (unknown ) warning fix
1.33 (2011-07-14) minor fixes suggested by Dave Moore
1.32 (2011-07-13) info support for all filetypes (SpartanJ)
1.31 (2011-06-19) a few more leak fixes, bug in PNG handling (SpartanJ)
1.30 (2011-06-11) added ability to load files via io callbacks (Ben Wenger)
1.29 (2010-08-16) various warning fixes from Aurelien Pocheville
1.28 (2010-08-01) fix bug in GIF palette transparency (SpartanJ)
See end of file for full revision history.
...
...
@@ -185,7 +181,7 @@
// overhead.
//
// The three functions you must define are "read" (reads some bytes of data),
// "s
tbi__s
kip" (skips some bytes of data), "eof" (reports if the stream is at the end).
// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end).
#ifndef STBI_NO_STDIO
...
...
@@ -242,7 +238,7 @@ STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y,
typedef
struct
{
int
(
*
read
)
(
void
*
user
,
char
*
data
,
int
size
);
// fill 'data' with 'size' bytes. return number of bytes actually read
void
(
*
s
tbi__skip
)
(
void
*
user
,
int
n
);
// stbi__
skip the next 'n' bytes, or 'unget' the last -n bytes if negative
void
(
*
s
kip
)
(
void
*
user
,
int
n
);
//
skip the next 'n' bytes, or 'unget' the last -n bytes if negative
int
(
*
eof
)
(
void
*
user
);
// returns nonzero if we are at end of file/data
}
stbi_io_callbacks
;
...
...
@@ -783,7 +779,7 @@ static void stbi__skip(stbi__context *s, int n)
int
blen
=
(
int
)
(
s
->
img_buffer_end
-
s
->
img_buffer
);
if
(
blen
<
n
)
{
s
->
img_buffer
=
s
->
img_buffer_end
;
(
s
->
io
.
s
tbi__s
kip
)(
s
->
io_user_data
,
n
-
blen
);
(
s
->
io
.
skip
)(
s
->
io_user_data
,
n
-
blen
);
return
;
}
}
...
...
@@ -3766,9 +3762,9 @@ static stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int re
if
(
stbi__at_eof
(
s
))
return
stbi__errpuc
(
"bad file"
,
"file too short (pic header)"
);
if
((
1
<<
28
)
/
x
<
y
)
return
stbi__errpuc
(
"too large"
,
"Image too large to stbi__jpeg_huff_decode"
);
stbi__get32be
(
s
);
//s
tbi__s
kip `ratio'
stbi__get16be
(
s
);
//s
tbi__s
kip `fields'
stbi__get16be
(
s
);
//s
tbi__s
kip `pad'
stbi__get32be
(
s
);
//skip `ratio'
stbi__get16be
(
s
);
//skip `fields'
stbi__get16be
(
s
);
//skip `pad'
// intermediate buffer is RGBA
result
=
(
stbi_uc
*
)
malloc
(
x
*
y
*
4
);
...
...
@@ -4534,6 +4530,7 @@ STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int
revision history:
1.38 (2014-06-06)
suppress MSVC warnings on integer casts truncating values
fix accidental rename of 'skip' field of I/O
1.37 (2014-06-04)
remove duplicate typedef
1.36 (2014-06-03)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录