/** 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; }
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; }
virtual int seek(INT64 offset, int origin) { if(substream) return substream->seek(offset, origin); return _io->seek_proc(_handle, (long)offset, origin); }
void C_IStream::seekg (Imf::Int64 pos) { _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); }
virtual void seekg(Imath::Int64 pos) { _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); }