Hi everyone this is the “report” of the project.<\/p>\n
This time we are using Imagemagick, Magick++; we can half size the image yeah, but we can’t change the color, ooooooooo u.u, so with this problem we are in a hurry, but we can do it and we feel positive with it because we are in the half of the way to complete this task \ud83d\ude42<\/p>\n
I feel like I\u00b4m not doing my best with this project, but here I am trying.<\/p>\n
Some links that we found, (more Ever) and \u00a0this can help:<\/p>\n
http:\/ http:\/ \u00a0<\/p>\n The code:<\/p>\n \u00a0<\/p>\n \u00a0<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":" Hi everyone this is the “report” of the project.<\/p>\n This time we are using Imagemagick, Magick++; we can half size the image yeah, but we can’t change the color, ooooooooo u.u, so with this problem we are in a hurry, but we can do it and we feel positive with it because we are in the half of the way to complete this task \ud83d\ude42<\/p>\n I feel like I´m not doing my best with this project, but here I am trying.<\/p>\n Some links that we found, (more Ever) and this can help:<\/p>\n http:\/\/www.imagemagick.org\/Magick++\/Color.html#ColorGray<\/a><\/p>\n http:\/\/www.imagemagick.org\/script\/perl-magick.php<\/a><\/p>\n <\/p>\n The code:<\/p>\n <\/p>\n <\/p>\n<\/div>\n","protected":false},"author":193,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[499,606,519,144,605,604,182,394,823,827,607,147,95],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26235"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/193"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26235"}],"version-history":[{"count":4,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26235\/revisions"}],"predecessor-version":[{"id":30043,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26235\/revisions\/30043"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<\/a>#include<\/a>
<\/a>#include<\/a>
using<\/span> namespace<\/span> std;
using<\/span> namespace<\/span> Magick;
void<\/span> newline<\/span>(){
\u00a0 coutendl;
}
int<\/span> main<\/span>(int<\/span> argc,char<\/span> **<\/span>argv)
{
\u00a0 InitializeMagick(*<\/span>argv);
\u00a0 try{
\u00a0 int<\/span> x;
\u00a0 cout\"Hi, Im a manipulator of images \"<\/span>endl;
\u00a0 newline();
\u00a0 cout\"What do you want to do? (press the number in your keyboard) \"<\/span>endl;
\u00a0 newline();
\u00a0 cout\"1. Rezise the image to one half of its original size\"<\/span>endl;
\u00a0 cout\"2. Switch to black and white\"<\/span>endl;
\u00a0 newline();
\u00a0 cin>><\/span>x;
\u00a0
\u00a0 if<\/span>(x==<\/span>1<\/span>){
\u00a0\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0\u00a0 cout\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span>endl;\u00a0
\u00a0\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0\u00a0 Image image;
\u00a0\u00a0\u00a0\u00a0 string img;
\u00a0\u00a0\u00a0\u00a0 cin>><\/span>img;
\u00a0\u00a0\u00a0\u00a0 image.read(img);
\u00a0\u00a0\u00a0\u00a0 image.minify();
\u00a0\u00a0\u00a0\u00a0 image.write(\"resized.jpg\"<\/span>);
\u00a0}
\u00a0 if<\/span>(x==<\/span>2<\/span>){
\u00a0\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0\u00a0 cout\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span>endl;\u00a0
\u00a0\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0\u00a0 Image image;
\u00a0\u00a0\u00a0\u00a0 string img2;
\u00a0\u00a0\u00a0\u00a0 cin>><\/span>img2;
\u00a0\u00a0\u00a0\u00a0 image.read(img2);
\u00a0\u00a0\u00a0\u00a0 image.quantize(colorspace.gray);
\u00a0\u00a0\u00a0\u00a0 image.write(\"blackandwhite.jpg\"<\/span>);
\u00a0} \u00a0\u00a0\u00a0 \u00a0
\u00a0}
\u00a0 catch<\/span>( Exception &<\/span>error_ )
\u00a0\u00a0\u00a0 {
\u00a0\u00a0\u00a0\u00a0\u00a0 cout \"Caught exception: \"<\/span> error_.what() endl;
\u00a0\u00a0\u00a0\u00a0\u00a0 return<\/span> 1<\/span>;
\u00a0\u00a0\u00a0 }
\u00a0 return<\/span> 0<\/span>;
}<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/pre>\n<\/a>#include<\/a> <\/span>
<\/a>#include<\/a> <\/span>
using<\/span> namespace<\/span> std;
using<\/span> namespace<\/span> Magick;
void<\/span> newline<\/span>(){
coutendl;
}
int<\/span> main<\/span>(int<\/span> argc,char<\/span> **<\/span>argv)
{
InitializeMagick(*<\/span>argv);
try{
int<\/span> x;
cout\"Hi, Im a manipulator of images \"<\/span>endl;
newline();
cout\"What do you want to do? (press the number in your keyboard) \"<\/span>endl;
newline();
cout\"1. Rezise the image to one half of its original size\"<\/span>endl;
cout\"2. Switch to black and white\"<\/span>endl;
newline();
cin>><\/span>x;
if<\/span>(x==<\/span>1<\/span>){
newline();
cout\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span>endl;
newline();
Image image;
string img;
cin>><\/span>img;
image.read(img);
image.minify();
image.write(\"resized.jpg\"<\/span>);
}
if<\/span>(x==<\/span>2<\/span>){
newline();
cout\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span>endl;
newline();
Image image;
string img2;
cin>><\/span>img2;
image.read(img2);
image.quantize(colorspace.gray);
image.write(\"blackandwhite.jpg\"<\/span>);
}
}
catch<\/span>( Exception &<\/span>error_ )
{
cout \"Caught exception: \"<\/span> error_.what() endl;
return<\/span> 1<\/span>;
}
return<\/span> 0<\/span>;
}<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/pre>\n