| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <limits.h> | 5 #include <limits.h> |
| 6 #include <stdio.h> | 6 #include <stdio.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 const char* buffer = | 431 const char* buffer = |
| 432 reinterpret_cast<const char*>(FPDFBitmap_GetBuffer(bitmap)); | 432 reinterpret_cast<const char*>(FPDFBitmap_GetBuffer(bitmap)); |
| 433 | 433 |
| 434 switch (format) { | 434 switch (format) { |
| 435 #ifdef _WIN32 | 435 #ifdef _WIN32 |
| 436 case OUTPUT_BMP: | 436 case OUTPUT_BMP: |
| 437 WriteBmp(name.c_str(), i, buffer, stride, width, height); | 437 WriteBmp(name.c_str(), i, buffer, stride, width, height); |
| 438 break; | 438 break; |
| 439 | 439 |
| 440 case OUTPUT_EMF: | 440 case OUTPUT_EMF: |
| 441 WriteEmf(page.c_str(), name, i); | 441 WriteEmf(page, name.c_str(), i); |
| 442 break; | 442 break; |
| 443 #endif | 443 #endif |
| 444 case OUTPUT_PPM: | 444 case OUTPUT_PPM: |
| 445 WritePpm(name.c_str(), i, buffer, stride, width, height); | 445 WritePpm(name.c_str(), i, buffer, stride, width, height); |
| 446 break; | 446 break; |
| 447 default: | 447 default: |
| 448 break; | 448 break; |
| 449 } | 449 } |
| 450 | 450 |
| 451 FPDFBitmap_Destroy(bitmap); | 451 FPDFBitmap_Destroy(bitmap); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 if (!file_contents) | 510 if (!file_contents) |
| 511 continue; | 511 continue; |
| 512 RenderPdf(filename, file_contents, file_length, options.output_format); | 512 RenderPdf(filename, file_contents, file_length, options.output_format); |
| 513 free(file_contents); | 513 free(file_contents); |
| 514 } | 514 } |
| 515 | 515 |
| 516 FPDF_DestroyLibrary(); | 516 FPDF_DestroyLibrary(); |
| 517 | 517 |
| 518 return 0; | 518 return 0; |
| 519 } | 519 } |
| OLD | NEW |