Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx1.public.one.com ([10.246.18.21])
	by mail6.local.one.com (Dovecot) with LMTP id CcYPNQhbglj6HwEAsyOMew
	for <filtered@awaresystems.be>; Fri, 20 Jan 2017 19:25:40 +0000
X-HalOne-ID: 39277de0-df46-11e6-98e7-b82a72d859f1
Received: from mail-oi0-f47.google.com (unknown [209.85.218.47])
	by mx1.public.one.com (Halon) with ESMTPS
	id 39277de0-df46-11e6-98e7-b82a72d859f1;
	Fri, 20 Jan 2017 19:25:39 +0000 (UTC)
Received: by mail-oi0-f47.google.com with SMTP id m124so48595003oif.1
        for <filtered@awaresystems.be>; Fri, 20 Jan 2017 11:25:38 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :date:from:to:in-reply-to:message-id:references:user-agent
         :mime-version:cc:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe
         :content-transfer-encoding:sender:errors-to;
        bh=XaiisDOt25Dji+WvpMAJ6xcacynEXEYCl775cL0eH7c=;
        b=iw+pe2R9D+CsqAI38U6JXsGJ3Vo4CtmzIK60Wg5k9IBehfcpM65iVxYeGcNZ16wkUj
         FI9AS7dEax+5wvzLi2FTiRwIee5nl6kfTkvApNJjuBgVVbaDpz5FgJyEQzT6CCWyKgFE
         UdURInnCQO+gxiCFoVRLNddU58qAwDjrAzXrdU3s/fy1jTy8OO1EE9Fs7psp5Pkzp/kM
         tn1VB6KHzFbgpgT7ahxXmYhTlBt1jhY0rkAS49muoKNG5C1eHPqxyxb9+4bFFEipUwDk
         UF+THW7JwUL3193AieXnsnNoHp6ypltvcsPCvt8FFdzUSbRHQd0mk25nkNpiexNu1lXV
         75TQ==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
X-Gm-Message-State: AIkVDXIlUrkZ13aArYQLSxifEQcmXdOMumUtwl7en7LmPF8RrRJeox+lUrlpgSDC7GgcWKB4bIg4kNiWvDjPwPOCi2Rkrrc=
X-Received: by 10.202.195.144 with SMTP id t138mr8141298oif.142.1484940337769;
        Fri, 20 Jan 2017 11:25:37 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.192.135 with SMTP id q129csp177507oif;
        Fri, 20 Jan 2017 11:25:36 -0800 (PST)
X-Received: by 10.28.0.2 with SMTP id 2mr4846539wma.141.1484940336836;
        Fri, 20 Jan 2017 11:25:36 -0800 (PST)
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id h28si4508076wmi.75.2017.01.20.11.25.36;
        Fri, 20 Jan 2017 11:25:36 -0800 (PST)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 1956235C053;
	Fri, 20 Jan 2017 14:24:47 -0500 (EST)
Received: from smtp.simplesystems.org (smtp.simplesystems.org [65.66.246.90])
	by lists.maptools.org (Postfix) with ESMTPS id A9ABF35C050
	for <tiff@lists.maptools.org>; Fri, 20 Jan 2017 14:24:38 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by smtp.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	v0KJOZaU011774; Fri, 20 Jan 2017 13:24:35 -0600 (CST)
Date: Fri, 20 Jan 2017 13:24:35 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Vincent Torri <vincent.torri@gmail.com>
In-Reply-To: <CAMq1adreAoL94WpzuQ3bk8R=KAA6f5wOR=CUWgxT6=HHOKgaAQ@mail.gmail.com>
Message-ID: <alpine.GSO.2.20.1701201323010.9121@freddy.simplesystems.org>
References: <CAMq1adrckAVqdVvbA9ZDOfTzDyLYw_UvR=P6d+XEMv3n=Phdrg@mail.gmail.com>
	<CAMq1adreAoL94WpzuQ3bk8R=KAA6f5wOR=CUWgxT6=HHOKgaAQ@mail.gmail.com>
User-Agent: Alpine 2.20 (GSO 67 2015-01-07)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
	(smtp.simplesystems.org [65.66.246.90]);
	Fri, 20 Jan 2017 13:24:35 -0600 (CST)
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Fwd: TIFF image displayed upside down
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Fri, 20 Jan 2017, Vincent Torri wrote:

> Hello
>
> I am trying to display this multipage TIFF :
> http://www.filedropper.com/multipagetiffexample
> The result I get is in this png file : http://www.filedropper.com/tiff
> I also want to say that it is the first time that I try to manage TIFF
> files and that I use the libtiff library.
>
> The code I use to display the tiff file is: http://pastebin.com/tUstLZz2
>
> so the result is like I display the lines in the reverse order (from
> bottom to top, and not from top to bottom)
>
> note that orientation of the TIFF image is : row 0 top, col 0 lhs
> (ORIENTATION_TOPLEFT).
>
> Does someone see what the problem is ?

TIFF provides the TIFFTAG_ORIENTATION tag to obtain the image 
orientation.  You need to obtain this tag's value and then decide what 
needs to be done to display the image properly.

The image could also be rotated on its side.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
