| 172 | } |
| 173 | |
| 174 | static boolean EmptyOutputBuffer(j_compress_ptr cinfo) |
| 175 | { |
| 176 | auto self = (JpegMemDest*)cinfo->dest; |
| 177 | size_t oldsize = self->mData.size(); |
| 178 | self->mData.Resize(oldsize + JPEGMEMDEST_BLOCK_SIZE); |
| 179 | cinfo->dest->next_output_byte = &self->mData[oldsize]; |
| 180 | cinfo->dest->free_in_buffer = self->mData.size() - oldsize; |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | static void TermDestination(j_compress_ptr cinfo) |
| 185 | { |