Advertisement
Guest User

Untitled

a guest
Apr 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
D 1.51 KB | None | 0 0
  1. struct IHDR{
  2.     align(1):
  3.     ubyte[4] Width_;
  4.     @property uint Width() {
  5.         return bigEndianToNative!uint(Width_);
  6.     }
  7.     @property void Width(uint v) {
  8.         Width_ = nativeToBigEndian!uint(v);
  9.     }
  10.  
  11.     ubyte[4] Height_;
  12.     @property uint Height() {
  13.         return bigEndianToNative!uint(Height_);
  14.     }
  15.     @property void Height(uint v) {
  16.         Height_ = nativeToBigEndian!uint(v);
  17.     }
  18.  
  19.     ubyte[1] BitDepth_;
  20.     @property IHDR_BitDepth BitDepth() {
  21.         return *cast(IHDR_BitDepth*)bigEndianToNative!ubyte(BitDepth_);
  22.     }
  23.     @property void BitDepth(IHDR_BitDepth v) {
  24.         BitDepth_ = v;
  25.     }
  26.  
  27.     ubyte[1] ColorType_;
  28.     @property IHDR_ColorType ColorType() {
  29.         return *cast(IHDR_ColorType*)bigEndianToNative!ubyte(ColorType_);
  30.     }
  31.     @property void ColorType(IHDR_ColorType v) {
  32.         ColorType_ = v;
  33.     }
  34.  
  35.     ubyte[1] CompressionMethod_;
  36.     @property IHDR_CompressionMethod CompressionMethod() {
  37.         return *cast(IHDR_CompressionMethod*)bigEndianToNative!ubyte(CompressionMethod_);
  38.     }
  39.     @property void CompressionMethod(IHDR_CompressionMethod v) {
  40.         CompressionMethod_ = v;
  41.     }
  42.  
  43.     ubyte[1] FilterMethod_;
  44.     @property IHDR_FilterMethod FilterMethod() {
  45.         return *cast(IHDR_FilterMethod*)bigEndianToNative!ubyte(FilterMethod_);
  46.     }
  47.     @property void FilterMethod(IHDR_FilterMethod v) {
  48.         FilterMethod_ = v;
  49.     }
  50.  
  51.     ubyte[1] InterlaceMethod_;
  52.     @property IHDR_InterlaceMethod InterlaceMethod() {
  53.         return *cast(IHDR_InterlaceMethod*)bigEndianToNative!ubyte(InterlaceMethod_);
  54.     }
  55.     @property void InterlaceMethod(IHDR_InterlaceMethod v) {
  56.         InterlaceMethod_ = v;
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement