| OLD | NEW |
| 1 /* ply-image.c - png file loader | 1 /* ply-image.c - png file loader |
| 2 * | 2 * |
| 3 * Copyright (C) 2006, 2007 Red Hat, Inc. | 3 * Copyright (C) 2006, 2007 Red Hat, Inc. |
| 4 * Copyright (C) 2003 University of Southern California | 4 * Copyright (C) 2003 University of Southern California |
| 5 * | 5 * |
| 6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
| 7 * it under the terms of the GNU General Public License as published by | 7 * it under the terms of the GNU General Public License as published by |
| 8 * the Free Software Foundation; either version 2, or (at your option) | 8 * the Free Software Foundation; either version 2, or (at your option) |
| 9 * any later version. | 9 * any later version. |
| 10 * | 10 * |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 if (!ply_image_load (image)) | 444 if (!ply_image_load (image)) |
| 445 { | 445 { |
| 446 exit_code = errno; | 446 exit_code = errno; |
| 447 perror (path); | 447 perror (path); |
| 448 exit (exit_code); | 448 exit (exit_code); |
| 449 } | 449 } |
| 450 return image; | 450 return image; |
| 451 } | 451 } |
| 452 | 452 |
| 453 #include "ply-frame-buffer.h" | 453 #include "ply-frame-buffer.h" |
| 454 #include "ply-gamma.h" |
| 454 | 455 |
| 455 #include <math.h> | 456 #include <math.h> |
| 456 #include <signal.h> | 457 #include <signal.h> |
| 457 #include <stdio.h> | 458 #include <stdio.h> |
| 458 #include <sys/ioctl.h> | 459 #include <sys/ioctl.h> |
| 459 #include <sys/time.h> | 460 #include <sys/time.h> |
| 460 #include <values.h> | 461 #include <values.h> |
| 461 | 462 |
| 462 #include <linux/kd.h> | 463 #include <linux/kd.h> |
| 463 | 464 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 | 556 |
| 556 buffer = ply_frame_buffer_new (NULL); | 557 buffer = ply_frame_buffer_new (NULL); |
| 557 | 558 |
| 558 if (!ply_frame_buffer_open (buffer)) | 559 if (!ply_frame_buffer_open (buffer)) |
| 559 { | 560 { |
| 560 exit_code = errno; | 561 exit_code = errno; |
| 561 perror ("could not open framebuffer"); | 562 perror ("could not open framebuffer"); |
| 562 return exit_code; | 563 return exit_code; |
| 563 } | 564 } |
| 564 | 565 |
| 566 ply_gamma_set(); |
| 567 |
| 565 if (clear) | 568 if (clear) |
| 566 { | 569 { |
| 567 ply_frame_buffer_clear (buffer); | 570 ply_frame_buffer_clear (buffer); |
| 568 } | 571 } |
| 569 else | 572 else |
| 570 { | 573 { |
| 571 /* | 574 /* |
| 572 * Display main image. | 575 * Display main image. |
| 573 */ | 576 */ |
| 574 ply_frame_buffer_show_file_at_xy (buffer, argv[1], 0, 0); | 577 ply_frame_buffer_show_file_at_xy (buffer, argv[1], 0, 0); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 } | 635 } |
| 633 } | 636 } |
| 634 } | 637 } |
| 635 | 638 |
| 636 // Skip these to save time. | 639 // Skip these to save time. |
| 637 // ply_frame_buffer_close (buffer); | 640 // ply_frame_buffer_close (buffer); |
| 638 // ply_frame_buffer_free (buffer); | 641 // ply_frame_buffer_free (buffer); |
| 639 | 642 |
| 640 return exit_code; | 643 return exit_code; |
| 641 } | 644 } |
| OLD | NEW |