Change Details
src/imageio.cpp |
144 | 144 | goto cleanup; |
145 | 145 | } |
146 | 146 | |
147 | | // Compute row pointers. |
148 | | png_bytep rowPointers[height]; |
149 | | for (png_uint_32 y = 0; y < height; y++) { |
150 | | rowPointers[y] = |
151 | | static_cast<png_bytep>(surface->pixels) + y * surface->pitch; |
152 | | } |
| 147 | // Note: GCC 4.9 doesn't want to jump over 'rowPointers' with goto |
| 148 | // if it is in the outer scope. |
| 149 | { |
| 150 | // Compute row pointers. |
| 151 | png_bytep rowPointers[height]; |
| 152 | for (png_uint_32 y = 0; y < height; y++) { |
| 153 | rowPointers[y] = |
| 154 | static_cast<png_bytep>(surface->pixels) + y * surface->pitch; |
| 155 | } |
153 | 156 | |
154 | | // Read the entire image in one go. |
155 | | png_read_image(png, rowPointers); |
| 157 | // Read the entire image in one go. |
| 158 | png_read_image(png, rowPointers); |
| 159 | } |
156 | 160 | |
157 | 161 | // Read rest of file, and get additional chunks in the info struct. |
158 | 162 | // Note: We got all we need, so skip this step. |
Download the corresponding diff file