Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id 539DF40063F
	for <filtered@awaresystems.be>; Wed, 11 Jan 2012 03:11:18 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.210.48 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pz0-f48.google.com (mail-pz0-f48.google.com [209.85.210.48])
	by mx-r.one.com (Postfix) with ESMTP id BF78FA44D9E
	for <filtered@awaresystems.be>; Wed, 11 Jan 2012 02:11:17 +0000 (UTC)
Received: by dadi14 with SMTP id i14so162885dad.21
        for <filtered@awaresystems.be>; Tue, 10 Jan 2012 18:11:16 -0800 (PST)
Received: by 10.68.197.232 with SMTP id ix8mr616248pbc.1.1326247876699;
        Tue, 10 Jan 2012 18:11:16 -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.142.215.12 with SMTP id n12cs107056wfg;
        Tue, 10 Jan 2012 18:11:15 -0800 (PST)
Received: by 10.68.197.67 with SMTP id is3mr506134pbc.69.1326247873840;
        Tue, 10 Jan 2012 18:11:13 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.250 as permitted sender) client-ip=91.198.169.250;
Received: by 10.130.149.11 with POP3 id w11mf139003dad.28;
        Tue, 10 Jan 2012 18:11:13 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.one.com (mx-s.one.com [91.198.169.250])
	by mail9.b-one.net (Postfix) with ESMTP id 4E44E40063F
	for <info@awaresystems.be>; Wed, 11 Jan 2012 02:58:09 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-s.one.com (Postfix) with ESMTP id E8EC518C39F8
	for <info@awaresystems.be>; Wed, 11 Jan 2012 01:58:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 0FD821EDA07;
	Tue, 10 Jan 2012 20:56:53 -0500 (EST)
Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com
	[209.85.212.172])
	by lists.maptools.org (Postfix) with ESMTPS id 71BBC1EDA01
	for <tiff@lists.maptools.org>; Tue, 10 Jan 2012 20:36:26 -0500 (EST)
Received: by wibhj6 with SMTP id hj6so16811wib.3
	for <tiff@lists.maptools.org>; Tue, 10 Jan 2012 17:36:25 -0800 (PST)
MIME-Version: 1.0
Received: by 10.180.77.228 with SMTP id v4mr38797151wiw.8.1326245784135; Tue,
	10 Jan 2012 17:36:24 -0800 (PST)
Received: by 10.223.116.18 with HTTP; Tue, 10 Jan 2012 17:36:24 -0800 (PST)
In-Reply-To: <CB31E03C.4CC14%ccox@adobe.com>
References: <CAAt2HVFs0=mubzQYORGthaKhFQhvtx0aA-0nwhu0jQ1pT66=gw@mail.gmail.com>
	<CB31E03C.4CC14%ccox@adobe.com>
Date: Wed, 11 Jan 2012 09:36:24 +0800
Message-ID: <CAAt2HVFBzamN92oTXzxGmDFb=pERW_RUjGdxeVUETqNaecDEfw@mail.gmail.com>
From: Jingfei Hu <jingfei.hu@gmail.com>
To: Chris Cox <ccox@adobe.com>
Cc: TIFF <tiff@lists.maptools.org>
Subject: Re: [Tiff] resolution issue when converting jpeg to tiff
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="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

I solved the problem with changing the type of xres/yres from int to
float. Anyway, I think it doesn't make any sense.

Cheers,

Jfhu

2012/1/11 Chris Cox <ccox@adobe.com>:
> Sounds like Windows properties isn't looking up the resolution metadata
> correctly, and defaults to 96dpi.
> But Photoshop's default is 72dpi, so that isn't a fair test.
> Try saving a document set to 300 dpi and see what each application shows.
>
> Photoshop CS5 is compliant with EXIF JPEG standards, and does not write t=
he
> obsolete JFIF resolution fields. =A0So if software is over 10 years old a=
nd
> failed to update to EXIF standards, they may be relying on the obsolete J=
FIF
> fields and not correctly reading the file resolution.
>
>
> Chris
>
>
>
> On 1/8/12 5:53 PM, "Jingfei Hu" <jingfei.hu@gmail.com> wrote:
>
>> Hi, everyone.
>> I've posted this question on www.stackoverflow.com, but got no proper
>> answer. So I decide to put this question here.
>>
>> Now I have some files whose suffix is .tif. However, I can't open it
>> with libtiff(Tiff for Windows 3.8.2). It says bad magic number
>> (0xd8ff). So I know these files aren't actually tiff files, they are
>> jpeg files.
>>
>> Then, I use libjpeg library to read these files. I need to convert
>> these jpeg files into tiff files. I get the x-resolution and
>> y-resolution using libexif(because libjpeg doesn't support this), says
>> 72 dpi, and I use TIFFSetField to set the corresponding field of the
>> tiff to be generated with no error occurred. But the x-resolution is
>> 96dpi when I look up the property of the generated tiff using Windows
>> Property(Right click on the tiff ->Property).
>>
>> When I use the utility of libtiff, tiffinfo.exe, to look the
>> information of generated tiff files, it returns (0,0) pixels/inch.
>>
>> When I open this generated tiff files with Photoshop CS5, it says 72
>> dpi in image size dialog (opened with Ctrl+Alt+I).
>>
>> I just doesn't know the reason. Is there a method to set the
>> resolution so that tiffinfo could recognize the resolution correctly.
>>
>> Hope make myself clear
>>
>> Cheers,
>>
>> Jfhu
>> _______________________________________________
>> Tiff mailing list: Tiff@lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/tiff
>> http://www.remotesensing.org/libtiff/
>
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
