Пример #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);
 }