| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 2001-6 mozilla.org | 4 * Portions are Copyright (C) 2001-6 mozilla.org |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Stuart Parmenter <stuart@mozilla.com> | 7 * Stuart Parmenter <stuart@mozilla.com> |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 jpeg_calc_output_dimensions(&m_info); | 456 jpeg_calc_output_dimensions(&m_info); |
| 457 m_decoder->setDecodedSize(m_info.output_width, m_info.output_height); | 457 m_decoder->setDecodedSize(m_info.output_width, m_info.output_height); |
| 458 | 458 |
| 459 m_decoder->setOrientation(readImageOrientation(info())); | 459 m_decoder->setOrientation(readImageOrientation(info())); |
| 460 | 460 |
| 461 // Allow color management of the decoded RGBA pixels if possible. | 461 // Allow color management of the decoded RGBA pixels if possible. |
| 462 if (!m_decoder->ignoresColorSpace()) { | 462 if (!m_decoder->ignoresColorSpace()) { |
| 463 JOCTET* profile = nullptr; | 463 JOCTET* profile = nullptr; |
| 464 unsigned profileLength = 0; | 464 unsigned profileLength = 0; |
| 465 if (read_icc_profile(info(), &profile, &profileLength)) { | 465 if (read_icc_profile(info(), &profile, &profileLength)) { |
| 466 decoder()->setColorProfileAndComputeTransform( | 466 decoder()->setEmbeddedColorProfile(reinterpret_cast<char*>(profile), |
| 467 reinterpret_cast<char*>(profile), profileLength); | 467 profileLength); |
| 468 free(profile); | 468 free(profile); |
| 469 } | 469 } |
| 470 if (decoder()->colorTransform()) { | 470 if (decoder()->colorTransform()) { |
| 471 overrideColorSpace = JCS_UNKNOWN; | 471 overrideColorSpace = JCS_UNKNOWN; |
| 472 } | 472 } |
| 473 } | 473 } |
| 474 if (overrideColorSpace == JCS_YCbCr) { | 474 if (overrideColorSpace == JCS_YCbCr) { |
| 475 m_info.out_color_space = JCS_YCbCr; | 475 m_info.out_color_space = JCS_YCbCr; |
| 476 m_info.raw_data_out = TRUE; | 476 m_info.raw_data_out = TRUE; |
| 477 m_uvSize = computeYUVSize( | 477 m_uvSize = computeYUVSize( |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 // has failed. | 1016 // has failed. |
| 1017 if (!m_reader->decode(onlySize) && isAllDataReceived()) | 1017 if (!m_reader->decode(onlySize) && isAllDataReceived()) |
| 1018 setFailed(); | 1018 setFailed(); |
| 1019 | 1019 |
| 1020 // If decoding is done or failed, we don't need the JPEGImageReader anymore. | 1020 // If decoding is done or failed, we don't need the JPEGImageReader anymore. |
| 1021 if (isComplete(this, onlySize) || failed()) | 1021 if (isComplete(this, onlySize) || failed()) |
| 1022 m_reader.reset(); | 1022 m_reader.reset(); |
| 1023 } | 1023 } |
| 1024 | 1024 |
| 1025 } // namespace blink | 1025 } // namespace blink |
| OLD | NEW |