示例#1
0
/**
Gets the current position of a memory pointer
@param stream Target FIMEMORY structure
@return Returns the current file position if successful, -1 otherwise
*/
long DLL_CALLCONV
FreeImage_TellMemory(FIMEMORY *stream) {
	FreeImageIO io;
	SetMemoryIO(&io);

	if (stream != NULL) {
		return io.tell_proc((fi_handle)stream);
	}

	return -1L;
}
示例#2
0
BOOL DLL_CALLCONV
FreeImage_Validate(FREE_IMAGE_FORMAT fif, FreeImageIO &io, fi_handle handle) {
	if (s_plugins != NULL) {
		BOOL validated = FALSE;

		PluginNode *node = s_plugins->FindNodeFromFIF(fif);

		if (node) {
			long tell = io.tell_proc(handle);

			validated = (node != NULL) ? (node->m_enabled) ? (node->m_plugin->validate_proc != NULL) ? node->m_plugin->validate_proc(io, handle) : FALSE : FALSE : FALSE;

			io.seek_proc(handle, tell, SEEK_SET);
		}

		return validated;
	}

	return FALSE;
}
示例#3
0
    virtual INT64 tell() { 
		if(substream) return substream->tell();
        return _io->tell_proc(_handle);
    }
示例#4
0
 virtual int eof() { 
     if(substream) return substream->eof();
     return (_io->tell_proc(_handle) >= _eof);
 }
示例#5
0
Imf::Int64
C_IStream::tellg () {
    return _io->tell_proc(_handle);
}
示例#6
0
 virtual Imath::Int64 tellg() {
     return _io->tell_proc(_handle);
 }