diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-03 13:22:21 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-03 13:22:21 -0400 |
commit | 019310a7e2be1f818bab9fd22f0ce3db8f5146c2 (patch) | |
tree | 53724eb7feb8cf24569f4c627fda6adcda3d54e6 /infinite.cpp | |
parent | 330f75e663c22e1198a92fd134865ada98c3957b (diff) | |
download | infinite-019310a7e2be1f818bab9fd22f0ce3db8f5146c2.tar.gz infinite-019310a7e2be1f818bab9fd22f0ce3db8f5146c2.tar.bz2 infinite-019310a7e2be1f818bab9fd22f0ce3db8f5146c2.zip |
Changed output to a JPEG because of Twitter's upload size restrictions
Diffstat (limited to 'infinite.cpp')
-rw-r--r-- | infinite.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/infinite.cpp b/infinite.cpp index bf09fe2..22de917 100644 --- a/infinite.cpp +++ b/infinite.cpp | |||
@@ -738,7 +738,7 @@ int main(int argc, char** argv) | |||
738 | textimage.opacity(((double)MaxRGB) * 0.8); | 738 | textimage.opacity(((double)MaxRGB) * 0.8); |
739 | image.composite(textimage, 0, 0, Magick::OverCompositeOp); | 739 | image.composite(textimage, 0, 0, Magick::OverCompositeOp); |
740 | 740 | ||
741 | image.magick("png"); | 741 | image.magick("jpg"); |
742 | 742 | ||
743 | Magick::Blob outputimg; | 743 | Magick::Blob outputimg; |
744 | image.write(&outputimg); | 744 | image.write(&outputimg); |
@@ -746,7 +746,7 @@ int main(int argc, char** argv) | |||
746 | std::cout << "Generated image!" << std::endl << "Tweeting..." << std::endl; | 746 | std::cout << "Generated image!" << std::endl << "Tweeting..." << std::endl; |
747 | 747 | ||
748 | long media_id; | 748 | long media_id; |
749 | twitter::response resp = client.uploadMedia("image/png", (const char*) outputimg.data(), outputimg.length(), media_id); | 749 | twitter::response resp = client.uploadMedia("image/jpeg", (const char*) outputimg.data(), outputimg.length(), media_id); |
750 | if (resp != twitter::response::ok) | 750 | if (resp != twitter::response::ok) |
751 | { | 751 | { |
752 | std::cout << "Twitter error while uploading image: " << resp << std::endl; | 752 | std::cout << "Twitter error while uploading image: " << resp << std::endl; |