diff options
author | Jaroslav Lichtblau | 2014-12-02 12:42:38 +0100 |
---|---|---|
committer | Jaroslav Lichtblau | 2014-12-02 12:42:38 +0100 |
commit | 26e913a21348fd74e898a0259e8887be4a4ccee4 (patch) | |
tree | a46013b89923057b2b87131695a57588d4889bf1 /imagemagick_plugin.patch | |
parent | 5fda468b0097ec4d28a9844f4ced4201a25478bd (diff) | |
download | aur-26e913a21348fd74e898a0259e8887be4a4ccee4.tar.gz |
galapix-0.2.1-1
Diffstat (limited to 'imagemagick_plugin.patch')
-rwxr-xr-x | imagemagick_plugin.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/imagemagick_plugin.patch b/imagemagick_plugin.patch new file mode 100755 index 000000000000..c80af2237922 --- /dev/null +++ b/imagemagick_plugin.patch @@ -0,0 +1,30 @@ +--- src/plugins/imagemagick.cpp 2013-03-18 14:21:49.848848166 +0900 ++++ src/plugins/imagemagick.cpp.new 2013-03-18 15:37:57.502107423 +0900 +@@ -124,10 +124,10 @@ + + for(int x = 0; x < width; ++x) + { +- dst_pixels[4*x + 0] = static_cast<uint8_t>(src_pixels[x].red >> shift); +- dst_pixels[4*x + 1] = static_cast<uint8_t>(src_pixels[x].green >> shift); +- dst_pixels[4*x + 2] = static_cast<uint8_t>(src_pixels[x].blue >> shift); +- dst_pixels[4*x + 3] = static_cast<uint8_t>(255 - (src_pixels[x].opacity >> shift)); ++ dst_pixels[4*x + 0] = static_cast<uint8_t>(src_pixels[x].red / QuantumRange * QuantumRange); ++ dst_pixels[4*x + 1] = static_cast<uint8_t>(src_pixels[x].green / QuantumRange * QuantumRange); ++ dst_pixels[4*x + 2] = static_cast<uint8_t>(src_pixels[x].blue / QuantumRange * QuantumRange); ++ dst_pixels[4*x + 3] = static_cast<uint8_t>(255 - (src_pixels[x].opacity / QuantumRange * QuantumRange)); + } + } + } +@@ -142,9 +142,9 @@ + + for(int x = 0; x < width; ++x) + { +- dst_pixels[3*x + 0] = static_cast<uint8_t>(src_pixels[x].red >> shift); +- dst_pixels[3*x + 1] = static_cast<uint8_t>(src_pixels[x].green >> shift); +- dst_pixels[3*x + 2] = static_cast<uint8_t>(src_pixels[x].blue >> shift); ++ dst_pixels[3*x + 0] = static_cast<uint8_t>(src_pixels[x].red / QuantumRange * QuantumRange); ++ dst_pixels[3*x + 1] = static_cast<uint8_t>(src_pixels[x].green / QuantumRange * QuantumRange); ++ dst_pixels[3*x + 2] = static_cast<uint8_t>(src_pixels[x].blue / QuantumRange * QuantumRange); + } + } + } |