@@ -157,6 +157,8 @@ class ImageData {
157
157
return box_texts_[index ];
158
158
}
159
159
// Saves the given Pix as a PNG-encoded string and destroys it.
160
+ // In case of missing PNG support in Leptonica use PNM format,
161
+ // which requires more memory.
160
162
void SetPix (Pix* pix);
161
163
// Returns the Pix image for *this. Must be pixDestroyed after use.
162
164
Pix* GetPix () const ;
@@ -183,6 +185,8 @@ class ImageData {
183
185
184
186
private:
185
187
// Saves the given Pix as a PNG-encoded string and destroys it.
188
+ // In case of missing PNG support in Leptonica use PNM format,
189
+ // which requires more memory.
186
190
static void SetPixInternal (Pix* pix, GenericVector<char >* image_data);
187
191
// Returns the Pix image for the image_data. Must be pixDestroyed after use.
188
192
static Pix* GetPixInternal (const GenericVector<char >& image_data);
@@ -192,8 +196,8 @@ class ImageData {
192
196
193
197
private:
194
198
STRING imagefilename_; // File to read image from.
195
- int32_t page_number_; // Page number if multi-page tif or -1.
196
- GenericVector<char > image_data_; // PNG file data.
199
+ int32_t page_number_; // Page number if multi-page tif or -1.
200
+ GenericVector<char > image_data_; // PNG/PNM file data.
197
201
STRING language_; // Language code for image.
198
202
STRING transcription_; // UTF-8 ground truth of image.
199
203
GenericVector<TBOX> boxes_; // If non-empty boxes of the image.
0 commit comments