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 03 Dec 2013 01:30:00 PM UTC  
 
Category: ConversionPriority: 3 - Low
Item Group: ErrorStatus: Need Info
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Open
Release: 1.0.7.21Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

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

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>
Project AdministratorIn charge of this item.
Wed 04 Dec 2013 02:25:12 PM UTC, comment #12:

what about strange density/dpi?

Massimiliano Gubinelli <mgubi>
Project 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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project 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>
Project 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>

 

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 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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 04 Dec 2013 02:15:48 PM UTCvdhoevenPriority5 - Normal=>3 - Low
    Wed 04 Dec 2013 02:15:22 PM UTCmgubiPriority3 - Low=>5 - Normal
    Wed 04 Dec 2013 02:12:46 PM UTCvdhoevenPriority5 - Normal=>3 - Low
    Wed 04 Dec 2013 09:49:35 AM UTCvdhoevenStatusNone=>Need Info
      Assigned toNone=>vdhoeven

    Back to the top


    Powered by Savane 3.1-cleanup