#define STBI_NO_STDIO
#define STBI_NO_WRITE
#define STBI_NO_HDR
/* stbi-1.29 - public domain JPEG/PNG reader - http://nothings.org/stb_image.c
when you control the images you're loading
no warranty implied; use at your own risk
QUICK NOTES:
Primarily of interest to game developers and other people who can
avoid problematic images and only need the trivial interface
JPEG baseline (no JPEG progressive)
PNG 8-bit only
TGA (not sure what subset, if a subset)
BMP non-1bpp, non-RLE
PSD (composited view only, no extra channels)
GIF (*comp always reports as 4-channel)
HDR (radiance rgbE format)
PIC (Softimage PIC)
- decoded from memory or through stdio FILE (define STBI_NO_STDIO to remove code)
- supports installable dequantizing-IDCT, YCbCr-to-RGB conversion (define STBI_SIMD)
Latest revisions:
1.29 (2010-08-16) various warning fixes from Aurelien Pocheville
1.28 (2010-08-01) fix bug in GIF palette transparency (SpartanJ)
1.27 (2010-08-01) cast-to-uint8 to fix warnings (Laurent Gomila)
allow trailing 0s at end of image data (Laurent Gomila)
1.26 (2010-07-24) fix bug in file buffering for PNG reported by SpartanJ
1.25 (2010-07-17) refix trans_data warning (Won Chun)
1.24 (2010-07-12) perf improvements reading from files
minor perf improvements for jpeg
deprecated type-specific functions in hope of feedback
attempt to fix trans_data warning (Won Chun)
1.23 fixed bug in iPhone support
1.22 (2010-07-10) removed image *writing* support to stb_image_write.h
stbi_info support from Jetro Lauha
GIF support from Jean-Marc Lienher
iPhone PNG-extensions from James Brown
warning-fixes from Nicolas Schulz and Janez Zemva
1.21 fix use of 'uint8' in header (reported by jon blow)
1.20 added support for Softimage PIC, by Tom Seddon
See end of file for full revision history.
TODO:
stbi_info support for BMP,PSD,HDR,PIC
rewrite stbi_info and load_file variations to share file handling code
(current system allows individual functions to be called directly,
since each does all the work, but I doubt anyone uses this in practice)
============================ Contributors =========================
Image formats Optimizations & bugfixes
Sean Barrett (jpeg, png, bmp) Fabian "ryg" Giesen
Nicolas Schulz (hdr, psd)
Jonathan Dummer (tga) Bug fixes & warning fixes
Jean-Marc Lienher (gif) Marc LeBlanc
Tom Seddon (pic) Christpher Lloyd
Thatcher Ulrich (psd) Dave Moore
Won Chun
the Horde3D community
Extensions, features Janez Zemva
Jetro Lauha (stbi_info) Jonathan Blow
James "moose2000" Brown (iPhone PNG) Laurent Gomila
Aruelien Pocheville
If your name should be here but isn't, let Sean know.
*/
#ifndef STBI_INCLUDE_STB_IMAGE_H
#define STBI_INCLUDE_STB_IMAGE_H
// To get a header file for this, either cut and paste the header,
// or create stb_image.h, #define STBI_HEADER_FILE_ONLY, and
// then include stb_image.c from it.
//// begin header file ////////////////////////////////////////////////////
//
// Limitations:
// - no jpeg progressive support
// - non-HDR formats support 8-bit samples only (jpeg, png)
// - no delayed line count (jpeg) -- IJG doesn't support either
// - no 1-bit BMP
// - GIF always returns *comp=4
//
// Basic usage (see HDR discussion below):
// int x,y,n;
// unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
// // ... process data if not NULL ...
// // ... x = width, y = height, n = # 8-bit components per pixel ...
// // ... replace '0' with '1'..'4' to force that many components per pixel
// stbi_image_free(data)
//
// Standard parameters:
// int *x -- outputs image width in pixels
// int *y -- outputs image height in pixels
// int *comp -- outputs # of image components in image file
// int req_comp -- if non-zero, # of image components requested in result
//
// The return value from an image loader is an 'unsigned char *' which points
// to the pixel data. The pixel data consists of *y scanlines of *x pixels,
// with each pixel consisting of N interleaved 8-bit components; the first
// pixel pointed to is top-left-most in the image. There is no padding between
// image scanlines or between pixels, regardless of format. The number of
// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
// If req_comp is non-zero, *comp has the number of components that _would_
// have been output otherwise. E.g. if you set req_comp to 4, you will always
// get RGBA output, but you can check *comp to easily see if it's opaque.
//
// An output image with N components has the following components interleaved
// in this order in each pixel:
//
// N=#comp components
// 1 grey
// 2 grey, alpha
// 3 red, green, blue
// 4 red, green, blue, alpha
//
// If image loading fails for any reason, the return value will be NULL,
// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
// can be queried for an extremely brief, end-user unfriendly explanation
// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
// more user-friendly ones.
//
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
//
// ===========================================================================
//
// iPhone PNG support:
//
// By default we convert iphone-formatted PNGs back to RGB; nominally they
// would silently load as BGR, except the existing code should have just
// failed on such iPhone PNGs. But you can disable this conversion by
// by calling stbi_convert_iphone_png_to_rgb(0), in which case
// you will always just get the native iphone "format" through.
//
// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
// pixel to remove any premultiplied alpha *only* if the image file explicitly
// says there's premultiplied data (currently only happens in iPhone images,
// and only if iPhone convert-to-rgb processing is on).
//
// ===========================================================================
//
// HDR image support (disable by defining STBI_NO_HDR)
//
// stb_image now supports loading HDR images in general, and currently
// the Radiance .HDR file format, although the support is provided
// generically. You can still load any file through the existing interface;
// if you attempt to load an HDR file, it will be automatically remapped to
// LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1;
// both of these constants can be reconfigured through this interface:
//
// stbi_hdr_to_ldr_gamma(2.2f);
// stbi_hdr_to_ldr_scale(1.0f);
//
// (note, do not use _inverse_ constants; stbi_image will invert them
// appropriately).
//
// Additionally, there is a new, parallel interface for loading
没有合适的资源?快使用搜索试试~ 我知道了~
duilib_DemoTreeview
共56个文件
cpp:21个
h:20个
png:6个
4星 · 超过85%的资源 需积分: 50 1.1k 下载量 74 浏览量
2011-07-02
15:59:25
上传
评论 15
收藏 1.12MB RAR 举报
温馨提示
用开源DirectUI库 duilib做的一棵树,库里面修改了少量部分底层代码 已达到现有效果 实现了 对叶子节点排序、container自动计算下滚动条功能,及提高了对WTL和MFC的兼容性。
资源推荐
资源详情
资源评论
收起资源包目录
duilibTreeView.rar (56个子文件)
duilibTreeView
UILib
UIList.h 13KB
UIManager.h 12KB
UIDelegate.h 2KB
UIControl.h 6KB
UIMarkup.h 3KB
UICombo.h 4KB
UICombo.cpp 28KB
UIRender.h 2KB
UIlib.cpp 1KB
XUnzip.cpp 149KB
UICommonControls.h 12KB
UIActiveX.cpp 36KB
UIRichEdit.cpp 59KB
UIMarkup.cpp 22KB
UIRender.cpp 83KB
UIControl.cpp 22KB
UIDlgBuilder.cpp 18KB
UIlib.h 1019B
UIBase.h 9KB
UIList.cpp 80KB
UIContainer.h 7KB
UIContainer.cpp 64KB
UIBase.cpp 30KB
UIDlgBuilder.h 888B
UIRichEdit.h 5KB
dui.lib 2.31MB
UIManager.cpp 65KB
StdAfx.cpp 282B
StdAfx.h 2KB
UIDelegate.cpp 2KB
UIActiveX.h 2KB
UICommonControls.cpp 82KB
stb_image.c 161KB
GameDemo
mainFrame.cpp 21KB
MiniDumper.cpp 11KB
mainFrame.h 3KB
Release
dui.lib 2.31MB
GameDemo.vcproj.263-PC.263.user 3KB
res
IconInfo.png 5KB
Wireless.png 3KB
Tools.png 4KB
all_bigicon_arrow.gft1.png 3KB
all_bigicon_arrow.gft.png 3KB
187.png 6KB
ControlEx.cpp 18KB
ControlEx.h 4KB
GameDemo.cpp 907B
GameDemo.rc 2KB
GameDemo.sln 1KB
StdAfx.cpp 1KB
resource.h 601B
MiniDumper.h 904B
StdAfx.h 1KB
GameDemo.aps 43KB
GameDemo.suo 26KB
GameDemo.vcproj 13KB
共 56 条
- 1
only_delusion
- 粉丝: 40
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
- 6
前往页