IImage::WriteToFile saves a copy of the current image plane into an image file in the specified format.
Note: this method is a part of the Image object, not of IImageDocument. The file is saved in the external format, saved file can be opened in image viewers and by methods IEngine::PrepareAndOpenImage, IFRDocument::AddImageFile.
IImageDocument::SaveTo saves the contents of the ImageDocument object into a folder on disk. The image is saved in ABBYY FineReader Engine internal format. It can be opened by calling IEngine::OpenImage. The main feature of this method is very quick opening. Use it in scenarios when it is impossible to keep all images in memory, and it is necessary to very fast open them on demand (for example, in IRecognizedPages interface implementation). Contents of the folder can be viewed by some image viewers like IrfanView, but please don't modify the file in 3-party application, otherwise, IEngine::OpenImage method won't read the result anymore.
IImageDocument::SaveToFile saves the contents of the ImageDocument object into a file. It is intended for use in cases when IImageDocument::SaveTo does not suit because of the folder. For example, a saving of the recognized image in a database and generally all process is constructed that is one file instead of the folder. It can be opened by IEngine::LoadImageDocFromFile method. Though may view the file as an image in some 3-rd party image viewers, but please don't modify the file. Otherwise, IEngine::LoadImageDocFromFile method won't read the result anymore.
IImageDocument::SaveToMemory saves the contents of the ImageDocument object into the global memory, allocated by the GlobalAlloc API function. It is the analog of the previous method (but in memory). To restore the contents of the ImageDocument object from the global memory, use the LoadImageDocFromMemory method of the Engine object.
Please sign in to leave a comment.