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

 
 

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

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

Submitted by:  Ingolf Schäfer <ovidius>
Submitted on:  Tue Dec 3 13:30:00 2013  
 
Category: ConversionPriority: 3 - Low
Item Group: ErrorStatus: Fixed
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Closed
Release: 1.99.5Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

(Jump to the original submission Jump to the original submission)

Mon Apr 4 06:31:26 2016, comment #15:

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

Philippe Joyez <pjoyez>
Project Member
Thu Dec 5 08:03:16 2013, 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 Dec 4 15:14:23 2013, comment #13:

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

Comment #12. What do you mean?

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Wed Dec 4 14:25:12 2013, comment #12:

what about strange density/dpi?

Massimiliano Gubinelli <mgubi>
Project Administrator
Wed Dec 4 14:24:51 2013, 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>
Project Administrator
Wed Dec 4 14:20:33 2013, 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>
Project AdministratorIn charge of this item.
Wed Dec 4 14:15:48 2013, 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>
Project AdministratorIn charge of this item.
Wed Dec 4 14:15:22 2013, 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>
Project Administrator
Wed Dec 4 14:12:46 2013, 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>
Project AdministratorIn charge of this item.
Wed Dec 4 12:27:42 2013, 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>
Project AdministratorIn charge of this item.
Wed Dec 4 09:49:35 2013, comment #5:

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

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Tue Dec 3 13:57:32 2013, 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 Dec 3 13:37:47 2013, comment #3:

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

Massimiliano Gubinelli <mgubi>
Project Administrator
Tue Dec 3 13:34:43 2013, comment #2:

No. This is disabled.

Ingolf Schäfer <ovidius>
Tue Dec 3 13:32:31 2013, comment #1:

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

Massimiliano Gubinelli <mgubi>
Project Administrator
Tue Dec 3 13:30:00 2013, 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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Apr 4 06:31:26 2016pjoyezStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
      Release1.0.7.21=>1.99.5
    Wed Dec 4 14:15:48 2013vdhoevenPriority5 - Normal=>3 - Low
    Wed Dec 4 14:15:22 2013mgubiPriority3 - Low=>5 - Normal
    Wed Dec 4 14:12:46 2013vdhoevenPriority5 - Normal=>3 - Low
    Wed Dec 4 09:49:35 2013vdhoevenStatusNone=>Need Info
      Assigned toNone=>vdhoeven

    Back to the top


    Powered by Savane 3.1-cleanup