bugGNU TeXmacs - Bugs: bug #40786, JPEG and PNG rescaling in PDF...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40786: JPEG and PNG rescaling in PDF export broken

Submitter:  Ingolf Schäfer <ovidius>
Submitted:  Tue 03 Dec 2013 01:30:00 PM UTC
   
 
Category:  Conversion Priority:  3 - Low
Item Group:  Error Status:  Fixed
Privacy:  Public Assigned to:  vdhoeven
Originator Name:  Open/Closed:  Closed
Release:  None Release:  1.99.5
Fixed Release:  None Fixed Release: 
Keywords: 

Jump to the original submission

Mon 04 Apr 2016 06:31:26 AM UTC, comment #15: 

Printing directly to ps is OK now for these images. Closing.

Philippe Joyez <pjoyez>
Group Member
Thu 05 Dec 2013 08:03:16 AM UTC, comment #14: 

I can confirm that switching to the pdf renderer solves my problem for PDF export. Unfortunately, it the bug is also affecting printing, but going through a pdf is an acceptable workaround for the moment.

I can reliably regenerate problematic images from xsane scans that are cropped by Gimp as it seems. But the problem only affects TeXmacs and not any other tools AFAICT.

Ingolf Schäfer <ovidius>
Wed 04 Dec 2013 03:14:23 PM UTC, comment #13: 

Comment #11.  I see; if your have the courage ;^)

Comment #12.  What do you mean?

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 04 Dec 2013 02:25:12 PM UTC, comment #12: 

what about strange density/dpi?

Massimiliano Gubinelli <mgubi>
Group administrator
Wed 04 Dec 2013 02:24:51 PM UTC, comment #11: 

 I think that  jpg can be included in PS in more-or-less the same way, for example see:

http://stackoverflow.com/questions/4968443/simple-way-to-add-an-image-in-postscript


Massimiliano Gubinelli <mgubi>
Group administrator
Wed 04 Dec 2013 02:20:33 PM UTC, comment #10: 

In reply to Max: yes, the new renderer works as it should, but since jpg is supported more directly, the call to ps_load has been shortcut.  Therefore, the same strategy cannot be applied in the original postscript renderer.  Furthermore, the scaling problem does not appear for many other jpg images.  Therefore, I still do not understand exactly what goes wrong for this particular image.

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 04 Dec 2013 02:15:48 PM UTC, comment #9: 

Notice also that the problem is not due to 'smallness' of the picture.  The bug is the same for any size of the picture that you may chose.

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 04 Dec 2013 02:15:22 PM UTC, comment #8: 

I haven't checked the problem but when I was working on the pdf export I noticed that we need some rationalization of the image support (various ways of getting image size, bounding box, various ways of exporting to eps, pdf, bitmap, etc..., caches for images in various points of the code) which has become quite fragmentated.

In the specific case I would guess that the problem is with the image resolution which is not taken into account properly. Joris, could you check that the new renderer works properly and in case use the same code in the old one?

Massimiliano Gubinelli <mgubi>
Group administrator
Wed 04 Dec 2013 02:12:46 PM UTC, comment #7: 

I don't understand what is going on.  The export does work for my own jpg images.  Notice that Max' native Pdf renderer has more direct support for images, and it also works as it should.  It seems that the bug only occurs in pathological circumstances.  Moreover, it should become marginal when Max' renderer will become the default (probably next version).  Nevertheless, I still would like to understand what is going on.

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 04 Dec 2013 12:27:42 PM UTC, comment #6: 

It seems that the problem is due to inappropriate scaling in the routine qt_image_to_eps (the produced eps seems to be too large).  I could stop using this code, but this would make us more dependent on external conversion tools.

Joris van der Hoeven <vdhoeven>
Group administrator
Wed 04 Dec 2013 09:49:35 AM UTC, comment #5: 

Could you please attach a small document which demonstrates the problem?

Joris van der Hoeven <vdhoeven>
Group administrator
Tue 03 Dec 2013 01:57:32 PM UTC, comment #4: 

It does not change if I export the document to postscript instead.

But is does work if I convert my jpeg image to eps and insert that and rescale it. Then it works properly in pdf and ps export of the document.

Ingolf Schäfer <ovidius>
Tue 03 Dec 2013 01:37:47 PM UTC, comment #3: 

try to export to ps. does it shows the same problem?

Massimiliano Gubinelli <mgubi>
Group administrator
Tue 03 Dec 2013 01:34:43 PM UTC, comment #2: 

No. This is disabled.

Ingolf Schäfer <ovidius>
Tue 03 Dec 2013 01:32:31 PM UTC, comment #1: 

are you configuring with --enable-pdf-renderer ?

Massimiliano Gubinelli <mgubi>
Group administrator
Tue 03 Dec 2013 01:30:00 PM UTC, original submission:  

When I insert a JPEG or PNG image and I scale it to a smaller size it is show correctly in TeXmacs, but in the export the image is cropped to the smaller size but not scaled properly.

The bug is still present in SVN 7986.


Ingolf Schäfer <ovidius>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pjoyez (Posted a comment)
  • -email is unavailable- added by vdhoeven (Posted a comment)
  • -email is unavailable- added by mgubi (Posted a comment)
  • -email is unavailable- added by ovidius (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-04 pjoyez StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Release1.0.7.21 1.99.5
    2013-12-04 vdhoeven Priority5 - Normal 3 - Low
    2013-12-04 mgubi Priority3 - Low 5 - Normal
    2013-12-04 vdhoeven Priority5 - Normal 3 - Low
    2013-12-04 vdhoeven StatusNone Need Info
        Assigned toNone vdhoeven

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code