Java中的MAGIMAGEHEADER [英] MAGIMAGEHEADER in java
本文介绍了Java中的MAGIMAGEHEADER的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Winapi中MAGIMAGEHEADER的结构是
The Structure of MAGIMAGEHEADER in Winapi is
typedef struct tagMAGIMAGEHEADER {
UINT width;
UINT height;
WICPixelFormatGUID format;
UINT stride;
UINT offset;
SIZE_T cbSize;
} MAGIMAGEHEADER, *PMAGIMAGEHEADER;
我已经用Java创建了一个等效的类.
I have created a equivalent class in Java.
import java.util.Arrays;
import java.util.List;
public class MAGIMAGEHEADER extends com.sun.jna.Structure {
public int width;
public int height;
public Object format;
public int stride;
public int offset;
public int cbsize;
public List getFieldOrder() {
return Arrays.asList("width","height","format","stride","offset","cbsize");
}
}
format
字段有问题,如何在Java中定义WICPixelFormatGUID?
I have problem with format
field, How to define WICPixelFormatGUID in Java?
我在winapi中找不到WICPixelFormatGUID
的任何结构.
I didn't find any structure of WICPixelFormatGUID
in winapi.
推荐答案
如您链接到的文档中所述,该类型在wincodec.h
中声明.在此处搜索类型,然后找到:
As stated in the documentation to which you link, the type is declared in wincodec.h
. Search for the type there and you find:
typedef /* [public] */ GUID WICPixelFormatGUID;
因此,毫无疑问,它是GUID
.
So, it is, not surprisingly, a GUID
.
I believe that means you need to use com.sun.jna.platform.win32.Guid.GUID
.
这篇关于Java中的MAGIMAGEHEADER的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文