Get the IFD portion of the EXIF header as a hex string.
195953
function getIfd(app1Start, dirEntries) {
        var offset = app1Start + 20,
            bytes = dirEntries * 12;

        return qq.readBlobToHex(fileOrBlob, offset, bytes);
    }
238408
def read_nih_image_header(fd, byte_order, dtype, count):
    """"""
    fd.seek(12, 1)
    return {'version': struct.unpack(byte_order+'H', fd.read(2))[0]}
734436
def hex(self):
        """"""
        props = self._message_properties()
        msg = bytearray([MESSAGE_START_CODE_0X02, self._code])

        for prop in props:
            # pylint: disable=unused-variable
            for key, val in prop.items():
                if val is None:
                    pass
                elif isinstance(val, int):
                    msg.append(val)
                elif isinstance(val, Address):
                    if val.addr is None:
                        pass
                    else:
                        msg.extend(val.bytes)
                elif isinstance(val, MessageFlags):
                    msg.extend(val.bytes)
                elif isinstance(val, bytearray):
                    msg.extend(val)
                elif isinstance(val, bytes):
                    msg.extend(val)
                elif isinstance(val, Userdata):
                    msg.extend(val.bytes)

        return binascii.hexlify(msg).decode()
115591
def get_if(iff, cmd):
    """"""

    sck = socket.socket()
    ifreq = ioctl(sck, cmd, struct.pack("16s16x", iff.encode("utf8")))
    sck.close()
    return ifreq
1311265
private void setHex() {

        String hRed = Integer.toHexString(getRed());
        String hGreen = Integer.toHexString(getGreen());
        String hBlue = Integer.toHexString(getBlue());

        if (hRed.length() == 0) {
            hRed = "00";
        }
        if (hRed.length() == 1) {
            hRed = "0" + hRed;
        }
        if (hGreen.length() == 0) {
            hGreen = "00";
        }
        if (hGreen.length() == 1) {
            hGreen = "0" + hGreen;
        }
        if (hBlue.length() == 0) {
            hBlue = "00";
        }
        if (hBlue.length() == 1) {
            hBlue = "0" + hBlue;
        }

        m_hex = hRed + hGreen + hBlue;
    }
116099
def _get_header(self):
        """"""
        fh = self._src
        obj = _make_object("Header")

        # first part of the header
        obj.Signature = sign = "".join(chr(unpack_ui8(fh)) for _ in range(3))
        obj.Version = self._version = unpack_ui8(fh)
        obj.FileLength = file_length = unpack_ui32(fh)

        # deal with compressed content
        if sign[0] == 'C':
            uncompressed = zlib.decompress(fh.read())
            if len(uncompressed) + 8 != file_length:
                raise ValueError("Problems dealing with compressed content")
            fh = self._src = io.BytesIO(uncompressed)

        # second part of the header
        obj.FrameSize = self._get_struct_rect()
        obj.FrameRate = unpack_ui16(fh)
        obj.FrameCount = unpack_ui16(fh)
        return obj
1221802
def hexdigest(self):
        """"""
        if not self._final:
            if self._buf_len >= self._MIN_LEN:
                self._tlsh.final()
                self._final = True
            else:
                raise ValueError("tlsh requires buffer with length >= %d "
                                 "for mode where force = %s" % \
                                 (self._MIN_LEN, False))
        return self._tlsh.hexdigest()
950755
def get_expstart(header,primary_hdr):
    """"""

    if 'expstart' in primary_hdr:
        exphdr = primary_hdr
    else:
        exphdr = header

    if 'EXPSTART' in exphdr:
        expstart = float(exphdr['EXPSTART'])
        expend = float(exphdr['EXPEND'])
    else:
        expstart = 0.
        expend = 0.0

    return (expstart,expend)
1099688
def _parseImageDosHeader(self, data):
        """"""
        ioh = IMAGE_DOS_HEADER.from_buffer(data)
        if ioh.e_magic != b'MZ':
            raise BinaryError('No valid PE/COFF file')

        return ImageDosHeaderData(header=ioh)
498111
def _sethex(self, hexstring):
        """"""
        hexstring = tidy_input_string(hexstring)
        # remove any 0x if present
        hexstring = hexstring.replace('0x', '')
        length = len(hexstring)
        if length % 2:
            hexstring += '0'
        try:
            try:
                data = bytearray.fromhex(hexstring)
            except TypeError:
                # Python 2.6 needs a unicode string (a bug). 2.7 and 3.x work fine.
                data = bytearray.fromhex(unicode(hexstring))
        except ValueError:
            raise CreationError("Invalid symbol in hex initialiser.")
        self._setbytes_unsafe(data, length * 4, 0)
218098
def get_header(self, idx, formatted=False):
        
        header = self._uname if not formatted else self._fname
        return [header[x] for x in idx]
1196867
def getHeader(self,exten=None):
        
        _image=fileutil.openImage(self._filename, clobber=False, memmap=False)
        _header=fileutil.getExtn(_image,extn=exten).header
        _image.close()
        del _image
        return _header
292945
private void validateIfdHC(IFD ifd, int p) {
    IfdTags metadata = ifd.getMetadata();

    int spp = -1;
    if (metadata.containsTagId(TiffTags.getTagId("SampesPerPixel"))) {
      spp = (int)metadata.get(TiffTags.getTagId("SampesPerPixel")).getFirstNumericValue();
    }
    if (p == 1) {
      checkRequiredTag(metadata, "NewSubfileType", 1, new long[]{0});
    }
    checkRequiredTag(metadata, "ImageLength", 1);
    checkRequiredTag(metadata, "ImageWidth", 1);
    checkRequiredTag(metadata, "BitsPerSample", spp);
    if (p == 1) {
      checkRequiredTag(metadata, "BitsPerSample", 4, new long[]{8});
    }
    checkRequiredTag(metadata, "Compression", 1, new long[]{32897});
    checkRequiredTag(metadata, "PhotometricInterpretation", 1, new long[] {5});
    checkRequiredTag(metadata, "StripOffsets", 1);
    if (p == 1 || p == 2) {
      checkRequiredTag(metadata, "Orientation", 1, new long[]{1});
    }
    if (p == 1) {
      checkRequiredTag(metadata, "SamplesPerPixel", 1, new long[]{4});
    }
    checkRequiredTag(metadata, "StripBYTECount", 1);
    checkRequiredTag(metadata, "XResolution", 1);
    checkRequiredTag(metadata, "YResolution", 1);
    checkRequiredTag(metadata, "PlanarConfiguration", 1, new long[]{1});
    if (p == 1 || p == 2) {
      checkRequiredTag(metadata, "ResolutionUnit", 1, new long[]{2, 3});
      checkRequiredTag(metadata, "InkSet", 1, new long[]{1});
      checkRequiredTag(metadata, "NumberOfInks", 1, new long[]{4});
      checkRequiredTag(metadata, "DotRange", 2, new long[]{0, 255});
    }
    checkRequiredTag(metadata, "TransparencyIndicator", 1, new long[]{0, 1});
  }
373334
def get_header(self, hdrclass, returnval=None):
        '''
        
        '''
        if isinstance(hdrclass, str):
            return self.get_header_by_name(hdrclass)

        for hdr in self._headers:
            if isinstance(hdr, hdrclass):
                return hdr
        return returnval
425490
function (hex) {
                var shortformRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i,
                    longformRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,
                    rgbParts;

                hex = hex.replace(shortformRegex, function (m, r, g, b) {
                    return r + r + g + g + b + b;
                });

                rgbParts = longformRegex.exec(hex);

                return rgbParts ? [ parseInt(rgbParts[1], 16), parseInt(rgbParts[2], 16), parseInt(rgbParts[3], 16) ] : [ 0, 0, 0 ];
            }
504297
def _raw_hex_id(obj):
    """"""
    # interpret as a pointer since that's what really what id returns
    packed = struct.pack('@P', id(obj))
    return ''.join(map(_replacer, packed))
1262298
def get_header_anim(self, im):
        
        bb = "GIF89a"
        bb += int_to_bin(im.size[0])
        bb += int_to_bin(im.size[1])
        bb += "\x87\x00\x00"
        return bb