| 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 #include <wchar.h> | 9 #include <wchar.h> |
| 10 | 10 |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 const char* buffer = | 448 const char* buffer = |
| 449 reinterpret_cast<const char*>(FPDFBitmap_GetBuffer(bitmap)); | 449 reinterpret_cast<const char*>(FPDFBitmap_GetBuffer(bitmap)); |
| 450 | 450 |
| 451 switch (format) { | 451 switch (format) { |
| 452 #ifdef _WIN32 | 452 #ifdef _WIN32 |
| 453 case OUTPUT_BMP: | 453 case OUTPUT_BMP: |
| 454 WriteBmp(name.c_str(), i, buffer, stride, width, height); | 454 WriteBmp(name.c_str(), i, buffer, stride, width, height); |
| 455 break; | 455 break; |
| 456 | 456 |
| 457 case OUTPUT_EMF: | 457 case OUTPUT_EMF: |
| 458 WriteEmf(page.c_str(), name, i); | 458 WriteEmf(page, name.c_str(), i); |
| 459 break; | 459 break; |
| 460 #endif | 460 #endif |
| 461 case OUTPUT_PPM: | 461 case OUTPUT_PPM: |
| 462 WritePpm(name.c_str(), i, buffer, stride, width, height); | 462 WritePpm(name.c_str(), i, buffer, stride, width, height); |
| 463 break; | 463 break; |
| 464 default: | 464 default: |
| 465 break; | 465 break; |
| 466 } | 466 } |
| 467 | 467 |
| 468 FPDFBitmap_Destroy(bitmap); | 468 FPDFBitmap_Destroy(bitmap); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 if (!file_contents) | 527 if (!file_contents) |
| 528 continue; | 528 continue; |
| 529 RenderPdf(filename, file_contents, file_length, options.output_format); | 529 RenderPdf(filename, file_contents, file_length, options.output_format); |
| 530 free(file_contents); | 530 free(file_contents); |
| 531 } | 531 } |
| 532 | 532 |
| 533 FPDF_DestroyLibrary(); | 533 FPDF_DestroyLibrary(); |
| 534 | 534 |
| 535 return 0; | 535 return 0; |
| 536 } | 536 } |
| OLD | NEW |