Пример #1
0
/**
Moves the memory pointer to a specified location
@param stream Pointer to FIMEMORY structure
@param offset Number of bytes from origin
@param origin Initial position
@return Returns TRUE if successful, returns FALSE otherwise
*/
BOOL DLL_CALLCONV
FreeImage_SeekMemory(FIMEMORY *stream, long offset, int origin) {
	FreeImageIO io;
	SetMemoryIO(&io);

	if (stream != NULL) {
		int success = io.seek_proc((fi_handle)stream, offset, origin);
		return (success == 0) ? TRUE : FALSE;
	}

	return FALSE;
}
Пример #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 int seek(INT64 offset, int origin) { 
        if(substream) return substream->seek(offset, origin);
		return _io->seek_proc(_handle, (long)offset, origin);
	} 
Пример #4
0
void
C_IStream::seekg (Imf::Int64 pos) {
    _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
}
Пример #5
0
 virtual void seekg(Imath::Int64 pos) {
     _io->seek_proc(_handle, (unsigned)pos, SEEK_SET);
 }