Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":26625,"date":"2015-11-21T22:34:40","date_gmt":"2015-11-22T04:34:40","guid":{"rendered":"https:\/\/everibarra101programming.withknown.com\/2015\/project-advance-3"},"modified":"2015-11-21T22:34:40","modified_gmt":"2015-11-22T04:34:40","slug":"project-advance-3-2","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2015\/2015\/project-advance-3-2\/","title":{"rendered":"#Project Advance 3"},"content":{"rendered":"
\n

We finally did the project, we just need to adjust some functions, because we were using functions from theimagemagick library, tomorrow we\u00b4re going to change the programm and see if it runs with arrays.<\/p>\n

here\u00b4s the code:<\/p>\n

<\/p>\n

\n
#include<\/a> <Magick++.h> <\/span>
#include<\/a> <iostream> <\/span>
using<\/span> namespace<\/span> std;
using<\/span> namespace<\/span> Magick;

void<\/span> newline<\/span>(){
\u00a0 cout<<<\/span>endl;
}

int<\/span> main<\/span>(int<\/span> argc,char<\/span> **<\/span>argv)
{
\u00a0 InitializeMagick(*<\/span>argv);
\u00a0 try{
\u00a0 int<\/span> x;
\u00a0 cout<<<\/span>"Hi, Im a manipulator of images "<\/span><<<\/span>endl;
\u00a0 newline();
\u00a0 cout<<<\/span>"What do you want to do? (press the number in your keyboard) "<\/span><<<\/span>endl;
\u00a0 newline();
\u00a0 cout<<<\/span>"1. Rezise the image to one half of its original size"<\/span><<<\/span>endl;
\u00a0 cout<<<\/span>"2. Switch to black and white"<\/span><<<\/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<<<\/span>"Alright, now introduce the name of the file with its extension; example: new.jpg"<\/span><<<\/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<<<\/span>"Alright, now introduce the name of the file with its extension; example: new.jpg"<\/span><<<\/span>endl;\u00a0
\u00a0\u00a0\u00a0\u00a0 newline();
\u00a0\u00a0\u00a0\u00a0 Image image2;
\u00a0\u00a0\u00a0\u00a0 string img2;
\u00a0\u00a0\u00a0\u00a0 cin>><\/span>img2;
\u00a0\u00a0\u00a0\u00a0 image2.read(img2);
\u00a0\u00a0\u00a0\u00a0 image2.quantizeColorSpace( GRAYColorspace );
\u00a0\u00a0\u00a0\u00a0 image2.quantizeColors( 256<\/span> );
\u00a0\u00a0\u00a0\u00a0 image2.quantize( );
\u00a0\u00a0\u00a0\u00a0 image2.write("blackandwhite.jpg"<\/span>);
\u00a0}\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0
\u00a0}
\u00a0 catch<\/span>( Exception &<\/span>error_ )
\u00a0\u00a0\u00a0 {
\u00a0\u00a0\u00a0\u00a0\u00a0 cout <<<\/span> "Caught exception: "<\/span> <<<\/span> error_.what() <<<\/span> endl;
\u00a0\u00a0\u00a0\u00a0\u00a0 return<\/span> 1<\/span>;
\u00a0\u00a0\u00a0 }
\u00a0 return<\/span> 0<\/span>;
}
<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"
\n

We finally did the project, we just need to adjust some functions, because we were using functions from theimagemagick library, tomorrow we´re going to change the programm and see if it runs with arrays.<\/p>\n

here´s the code:<\/p>\n

<\/p>\n

\n
#include<\/a> <Magick++.h> <\/span>
#include<\/a> <iostream> <\/span>
using<\/span> namespace<\/span> std;
using<\/span> namespace<\/span> Magick;

void<\/span> newline<\/span>(){
  cout<<<\/span>endl;
}

int<\/span> main<\/span>(int<\/span> argc,char<\/span> **<\/span>argv)
{
  InitializeMagick(*<\/span>argv);
  try{
  int<\/span> x;
  cout<<<\/span>\"Hi, Im a manipulator of images \"<\/span><<<\/span>endl;
  newline();
  cout<<<\/span>\"What do you want to do? (press the number in your keyboard) \"<\/span><<<\/span>endl;
  newline();
  cout<<<\/span>\"1. Rezise the image to one half of its original size\"<\/span><<<\/span>endl;
  cout<<<\/span>\"2. Switch to black and white\"<\/span><<<\/span>endl;
  newline();
  cin>><\/span>x;
 
  if<\/span>(x==<\/span>1<\/span>){
     newline();
     cout<<<\/span>\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span><<<\/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<<<\/span>\"Alright, now introduce the name of the file with its extension; example: new.jpg\"<\/span><<<\/span>endl; 
     newline();
     Image image2;
     string img2;
     cin>><\/span>img2;
     image2.read(img2);
     image2.quantizeColorSpace( GRAYColorspace );
     image2.quantizeColors( 256<\/span> );
     image2.quantize( );
     image2.write(\"blackandwhite.jpg\"<\/span>);
 }      
 }
  catch<\/span>( Exception &<\/span>error_ )
    {
      cout <<<\/span> \"Caught exception: \"<\/span> <<<\/span> error_.what() <<<\/span> endl;
      return<\/span> 1<\/span>;
    }
  return<\/span> 0<\/span>;
}
<\/pre>\n<\/div>\n<\/div>\n","protected":false},"author":262,"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,607,147,95],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26625"}],"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\/262"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=26625"}],"version-history":[{"count":3,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26625\/revisions"}],"predecessor-version":[{"id":30007,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/26625\/revisions\/30007"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=26625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=26625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=26625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}