From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Andrus Newsgroups: gmane.emacs.bugs Subject: bug#12506: 24.2.50; Docview shrinks width to fit screen Date: Tue, 25 Sep 2012 15:14:41 +0200 Message-ID: <07F0C69D-AABE-4C34-96B0-04C58EFA8338@gmail.com> References: <3B2F4906-4358-4789-8168-594D8D8337A2@gmail.com> <871uhqebsk.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1348578922 9023 80.91.229.3 (25 Sep 2012 13:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Sep 2012 13:15:22 +0000 (UTC) Cc: 12506@debbugs.gnu.org To: Tassilo Horn Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 25 15:15:26 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TGUyu-0004pQ-Ob for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2012 15:15:20 +0200 Original-Received: from localhost ([::1]:53504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGUyp-0006jL-Q6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Sep 2012 09:15:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGUyj-0006gs-M2 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 09:15:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGUyd-0007un-98 for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 09:15:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGUyd-0007uS-6V for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 09:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TGV0Y-0004cL-1S for bug-gnu-emacs@gnu.org; Tue, 25 Sep 2012 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Andrus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Sep 2012 13:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12506 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12506-submit@debbugs.gnu.org id=B12506.134857900717727 (code B ref 12506); Tue, 25 Sep 2012 13:17:01 +0000 Original-Received: (at 12506) by debbugs.gnu.org; 25 Sep 2012 13:16:47 +0000 Original-Received: from localhost ([127.0.0.1]:54699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGV0J-0004br-6U for submit@debbugs.gnu.org; Tue, 25 Sep 2012 09:16:47 -0400 Original-Received: from mail-ee0-f44.google.com ([74.125.83.44]:56397) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TGV0G-0004bj-M4 for 12506@debbugs.gnu.org; Tue, 25 Sep 2012 09:16:45 -0400 Original-Received: by eekd4 with SMTP id d4so966965eek.3 for <12506@debbugs.gnu.org>; Tue, 25 Sep 2012 06:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=EQpIyHq3BIp8am3Q4DCwzlCOsOBkS1dap7Yvh0TfLwI=; b=llSgqdPLYokiL75EdIIuAPsspB8djsXVE2sUfCQjPEH57Px/CVig+NvJG/9uEySsXu cCJkyrtSHqtdtGf6MM8WDjY4NUGsZfhTHD3wjoWMZm3Z8Uke33RQunXbmaWtPFu6Nl+/ V7VWIdErRnomhMx8iVwqH6qcGqhJy0ej/9GtSKxYDvHMo79QnWSazD8rH6hpHEmVLM7C 1h6ke1whRRAVD/sbEbQPOMxcp5fO3BSZJ9ZFYBLPzBAF0F4fH+Tnk5JF60BbRU2qiAZ2 xEUMxXp1iEn1JMj3zzYTDUCIno3ehUOB9j03W8fUqLA4ZwlvyB5Lkiu6aeA14QjxsA63 0paw== Original-Received: by 10.14.218.134 with SMTP id k6mr19964637eep.14.1348578884005; Tue, 25 Sep 2012 06:14:44 -0700 (PDT) Original-Received: from [10.0.2.25] (catv-80-99-177-93.catv.broadband.hu. [80.99.177.93]) by mx.google.com with ESMTPS id n5sm345543bkv.14.2012.09.25.06.14.41 (version=SSLv3 cipher=OTHER); Tue, 25 Sep 2012 06:14:42 -0700 (PDT) In-Reply-To: <871uhqebsk.fsf@thinkpad.tsdh.de> X-Mailer: Apple Mail (2.1085) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:64874 Archived-At: On Sep 25, 2012, at 10:39 AM, Tassilo Horn wrote: > Ivan Andrus writes: >=20 >> I occasionally use doc-view-mode to read pdfs. I have noticed that = if >> the window is skinnier than the width of the pdf then the width is >> shrunk so that it all fits. However, the height is not affected. >> This leads to "squished" text which is unreadable. >>=20 >> To see the effect: >>=20 >> 1. emacs -Q >> 2. open a pdf in doc-view-mode >> 3. type "W" for `doc-view-fit-width-to-window' >> 4. C-x 3 to split the window >> 5. You now have a squished picture. >>=20 >> I think it should not scale the width at all (and it did not use to). >> It makes zooming in impossible. Especially it should not scale the >> width without scaling the height. >=20 > I can't reproduce that on a GNU/Linux box. After step 3, the image = fits > exactly the width of the emacs window and the height is set correctly = to > keep the aspect ratio. After step 4, I have two side-by-side windows, > each showing about the left half of the image, but no squishing. Perhaps it's a NextStep only problem. > Have you compiled emacs with ImageMagick support? I guess so, because > else doc-view would fall back to reconversion with any zooming = command. > So let's assume you have ImageMagick support, could you please = evaluate >=20 > ;; That's basically what doc-view with ImageMagic does when > ;; fitting/zooming > (insert-image > (create-image "/some/image.png" > 'imagemagick nil :width 100)) >=20 > and play a bit with the width parameter? In any case, the image = should > keep its original aspect ratio. I'm pretty sure I don't have it with ImageMagick support. The above = gives me an error, and the configure logs confirm this. > ,----[ (info "(elisp)ImageMagick Images") ] > | `:width, :height' > | The `:width' and `:height' keywords are used for scaling the > | image. If only one of them is specified, the other one will be > | calculated so as to preserve the aspect ratio. If both are > | specified, aspect ratio may not be preserved. > `---- >=20 > If you don't have ImageMagick support, could you check if just finding > some png image with image-mode and then splitting has the same squish > effect? I also see the same problem with a jpeg in image mode. I should have = checked that first, sorry. Of course, I can't scale the image, but the = squishing definitely occurs. -Ivan=