comp.lang.ada
 help / color / mirror / Atom feed
From: Roger <rogermcm2@gmail.com>
Subject: Re: Problem Building Ada Interface To ImageMagick 7
Date: Tue, 26 Jun 2018 06:13:02 -0700 (PDT)
Date: 2018-06-26T06:13:02-07:00	[thread overview]
Message-ID: <43e020d3-653d-4a38-9795-a84966b50bf0@googlegroups.com> (raw)
In-Reply-To: <2b125d10-065d-404a-a8d3-1c5debe4b3a2@googlegroups.com>

On Tuesday, June 26, 2018 at 7:34:57 PM UTC+10, gautier...@hotmail.com wrote:
> Is there something specific you want to do with ImageMagick ?

The current specific thing I'm trying to do (in support of a larger project) is to get ImageMagick to read an image file and writing the image to another file.
I am using a simple ImageMagick tutorial to do this.
The tutorial read and write functions work when built as an XCode project but fail as a GNAT GPS project.
The code that I posted constitutes some of my attempts to track the problem.

Following is the tutorial code which builds and runs properly with XCode but fails under GNAT:
//  main.cpp
//  ImageMagick_Test

#include <Magick++.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

using namespace std;
using namespace Magick; 

int main(int argc, const char * argv[]) {
    InitializeMagick(*argv);
    
    // Construct the image object. Seperating image construction from the
    // the read operation ensures that a failure to read the image file
    // doesn't render the image object useless.
    Image image;

    try {
        // Read a file into image object
        image.read( "logo:" );
        
        // Crop the image to specified size (width, height, xOffset, yOffset)
        image.crop( Geometry(100,100, 100, 100) );
        
        // Write the image to a file
        image.write( "../../../../logo.png" );
    }
    catch( Exception &error_ )
    {
        cout << "Caught exception: " << error_.what() << endl;
        return 1;
    } 
    return 0;
}

  parent reply	other threads:[~2018-06-26 13:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26  8:28 Problem Building Ada Interface To ImageMagick 7 Roger
2018-06-26  9:26 ` alby.gamper
2018-06-26 11:58   ` Roger
2018-06-26 12:35     ` alby.gamper
2018-06-26 13:43       ` Roger
2018-06-27  2:08         ` Roger
2018-06-26 18:58   ` Jacob Sparre Andersen
2018-06-30  1:25   ` Roger
2018-06-26  9:34 ` gautier_niouzes
2018-06-26 11:51   ` Roger
2018-06-26 13:13   ` Roger [this message]
2018-06-26 16:28     ` gautier_niouzes
2018-06-26 17:47       ` Roger
2018-06-26 18:14       ` Roger
2018-06-26 18:38         ` gautier_niouzes
2018-06-27  2:11           ` Roger
2018-06-27  4:55             ` gautier_niouzes
2018-06-27  7:07               ` Roger
2018-06-27  7:28                 ` gautier_niouzes
2018-06-27  8:05                   ` Roger
2018-06-27  7:04           ` Dmitry A. Kazakov
2018-06-27  7:12             ` Roger
2018-06-27  9:59             ` gautier_niouzes
2018-06-27 12:34     ` Stephen Leake
2018-06-27 12:41       ` Roger
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox