Phatch - alteration svg > png > jpg

Bug #398704 reported by itoun saï
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Phatch
Fix Released
Medium
Nadia Alramli

Bug Description

Such as we had discussed with Stani to the Nantes's RMLL, I place you in join file an archive where you will find the various screen shots which will allow you to understand the problem I met concerning the conversion of the stemming .png of inkscape towards the .jpg format:

* 00_inkscape.svg
* 00_inkscape-export-150dpi.png
* 01_gimp_image-aplatie-enregistrement-jpg-100%.jpg
* 02_david-s_batch_processor_config_01.jpg
* 03_david-s_batch_processor_essai_01.jpg
* 04_david-s_batch_processor_config_02.jpg
* 05_david-s_batch_processor_essai_02.jpg
* 06_phatch_config.png
* 07_phatch-export.jpg
* 08_comparatif_rendus.jpg

In the file "00_inkscape.svg" you can realize that there is:

* a .png bitmap including a shade worn (which will maybe have disappeared well in the svg, link obliges)
* a shape rectangle black with alpha 75 %
* a 3D shape
* of the (editable) text

To assure(insure) you a good comparison, I made the operation in passing:

* Directly in Gimp
  (c.f.: 01_gimp_image-aplatie-enregistrement-jpg-100%.jpg)
* then by way of the plugin " Of David Batch Processor "
  (c.f.: 02_david-s_batch_processor_config_01.jpg
          03_david-s_batch_processor_essai_01.jpg
          04_david-s_batch_processor_config_02.jpg
          05_david-s_batch_processor_essai_02.jpg)
* to finish by Phatch
  (c.f.: 06_phatch_config.png
          07_phatch-export.jpg)

You can realize by opening the file "08_comparatif_rendus.jpg" to a 100 % view that only the operation of conversion png > jpg made via a manual manipulation in Gimp (to flatten the image > to record under > .jpg in 100 %) can be considered as good rendering.

* The oblique lines become staircase with the plugin " Of David Batch Processor " or "Phatch" but just undergoes a weak vagueness via Gimp who remains acceptable.
* Texts are altered in the same way.
* The opaqueness of the shape rectangle black in 75 % is lost with the plugin " Of David Batch Processor " or "Phatch", and undergoes no change via Gimp
* The .png bitmap loses a big part of its transparency at the level of the shade worn with the plugin " Of David Batch Processor " or "Phatch", and undergoes no change via Gimp.

After all, the results with the plugin " Of David Batch Processor " or "Phatch" does not equal that obtained by a manual use of Gimp. = > in that very private individual case we agree :) !!
Staying to your answer,
Itoun

Revision history for this message
itoun saï (itoun-sai) wrote :
Revision history for this message
Stani (stani) wrote :

Thanks for taking the effort to report this bug.

Revision history for this message
Nadia Alramli (nadiana) wrote :

Hi Itoun,

Thank you for this great bug report. It looks like this is an issue with PIL's default behaviour when converting RGBA images to RGB. Luckily there is a workaround for this. You can add a white background to the image before saving it as JPG. I attached an example actionlist and the result produced by phatch.

I'm going to work on a fix for this. It should be an easy one. The white background solution is only a temporary workaround for you until the fix is available.

Thanks,
Nadia

Nadia Alramli (nadiana)
Changed in phatch:
status: New → In Progress
Revision history for this message
Nadia Alramli (nadiana) wrote :
Revision history for this message
Stani (stani) wrote :

Thanks a lot Nadia! Your fix has been merged in my branch and it is pushed upstream. It will be in my PPA with the next build.

$ bzr merge lp:~nadiana/phatch/phatch-dev
 M phatch/actions/save.py
 M phatch/core/lib/imtools.py
 M phatch/core/pil.py
All changes applied successfully.

$ bzr commit -m "white background fix"
Committing to: /home/stani/sync/python/phatch/trunk/
modified phatch/actions/save.py
modified phatch/core/pil.py
modified phatch/core/lib/imtools.py
Committed revision 939.

Changed in phatch:
assignee: nobody → Nadia Alramli (nadiana)
importance: Undecided → Medium
status: In Progress → Fix Committed
Stani (stani)
Changed in phatch:
milestone: none → 0.2.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.