After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 535179 - Export to png does not use AntiAliasing
Export to png does not use AntiAliasing
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: exports
0.96.1
Other All
: Normal enhancement
: 0.97
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-28 00:09 UTC by Dan Mihai Ile
Modified: 2009-01-31 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The source diagram of a simple test case (718 bytes, application/x-dia-diagram)
2008-05-28 00:10 UTC, Dan Mihai Ile
Details
Result for step: [Under "File->Export..." in the dialog select: "Determine file type: By extension" and under "Name: " put something like "test.png" ] (1.78 KB, image/png)
2008-05-28 00:11 UTC, Dan Mihai Ile
Details
Result for step: [Under "File->Export..." in the dialog select "Determine file type: Portable Network Graphics (*.png)" and under "Name: " put something like "test2.png"] (6.48 KB, image/png)
2008-05-28 00:13 UTC, Dan Mihai Ile
Details

Description Dan Mihai Ile 2008-05-28 00:09:35 UTC
Please describe the problem:
When creating a diagram and exporting to .png the final result is not antialiased.
I lost hours to find why my girlfriend actually produced an antialiased version of the diagram to .png but was unable to reprodice the result!!

Steps to reproduce:
1. Open Dia and make a simple diagram with some arrows that are neither compleetly horizontally or vertically.
2. Under "File->Export..." in the dialog select: "Determine file type: By extension" and under "Name: " put something like "test.png"
3. Open the final test.png result with eye of gnome and zoom to 100% and observe the quality
4. Now let's export the file again so in dia under "File->Export..." in the dialog select "Determine file type: Portable Network Graphics (*.png)" and under  "Name: " put something like "test2.png"
5. A window will ask about image size, just click "ok".
6. Open the final test2.png result with eye of gnome and zoom to 100% and observe the quality


Actual results:
In the file test.png we have no antialiasing, a very poor quality .png is generated but in the file test2.png we have antialiasing and the quality of the resulting .pg is great!

Expected results:
I would expect that in both cases a window asking about image size should appear and the final .png should have great quality

Does this happen every time?
Yes.

Other information:
Comment 1 Dan Mihai Ile 2008-05-28 00:10:44 UTC
Created attachment 111639 [details]
The source diagram of a simple test case
Comment 2 Dan Mihai Ile 2008-05-28 00:11:57 UTC
Created attachment 111640 [details]
Result for step: [Under "File->Export..." in the dialog select: "Determine file type: By extension" and under "Name: " put something like "test.png" ]
Comment 3 Dan Mihai Ile 2008-05-28 00:13:22 UTC
Created attachment 111641 [details]
Result for step: [Under "File->Export..." in the dialog select "Determine file type: Portable Network Graphics (*.png)" and under  "Name: " put something like "test2.png"]
Comment 4 Hans Breuer 2008-05-28 05:47:51 UTC
Do I understand this right: you are complaining about different PNG exporters being different? Rest assured there *are* reasons (users) to(who) prefer not anti aliased output. (choose "Pixbuf[png]").
Or is your issue that only some filters support setting the size via the small dialog?
Comment 5 Dan Mihai Ile 2008-05-28 08:04:01 UTC
No, I am complaining about that if I want my .png antialiased and save the file as "test.png" leaving "Determine file type: By extension"it should have the same effect as selecting "Determine file type: Portable Network Graphics (*.png)".
Because when you say "Determine file type by extension" it means that dia will automatically select for me Portable Network Graphics (*.png)

If there are people that don't want antialiasing then:
in the first place saving the .png in the both ways I describe should produce the same output (the output where a window appears asking for the image size).
you could have an option in that window to choose antialiasing (on/off)

I hope I could explain this right...
Comment 6 Hans Breuer 2008-05-28 18:29:19 UTC
So you want to have one of the exporters magically preferred? There already is a way to do this - but currently only for the one you have choosen. Go to File/Plugins and un-check "Load at startup" for "Cairo based rendering" and "gdk-pixbuf based bitmap export/import".
This will leave only the (currently) built-in "Portable Nwtwork Graphics" filter to save PNG. Of course it will also remove other capabilities of the two disabled plug-ins.
Comment 7 Michael Hudson 2008-11-07 05:39:16 UTC
I am dealing with this too.  I can remember DIA asking me about the quality of output when exporting, but I'll be damned if I can figure out how to do it now.  For example when I export a single page to .jpg, I end up with .jpg thats about 5K in size.  I blow it up to give to a windoze user, and it looks like crap.  I remember making big .jpg's and it worked fine, but now I'm can't figure out how get the option for export quality.  DIA docs don't spend a whole lot of time on exporting.
Comment 8 Daniel Nebdal 2008-11-29 19:34:06 UTC
(In reply to comment #6)
> So you want to have one of the exporters magically preferred? There already is
> a way to do this - but currently only for the one you have choosen. Go to
> File/Plugins and un-check "Load at startup" for "Cairo based rendering" and
> "gdk-pixbuf based bitmap export/import".
> This will leave only the (currently) built-in "Portable Network Graphics"
> filter to save PNG. Of course it will also remove other capabilities of the two
> disabled plug-ins.
> 

It does feel rather ... mystical when "determine by filetype" and "PNG" gives different options, but now that you've mentioned the new pixmap exporters and I've looked through the list in detail and noticed them it makes some sense.

Not that it should be allowed to remain like this - the most obvious choice for PNG isn't the pixmap one, so the above mysticality remains (see the original bug report for a good example of a mystified user). On top of that, the default (that is, pixmap) exporter isn't even the best one.

In the long term, some form of priority settings (with sensible defaults) might be a good idea, or at least a small hack to prefer the (some of the) builtin exporters. Is anything like that planned?
Comment 9 Hans Breuer 2009-01-31 21:45:38 UTC
Not planned, implemeted :

2008-12-14  Hans Breuer  <hans@breuer.org>

	* app/preferences.[ch] lib/filter.[ch] lib/libdia.def : allow to select
	a preferred export filter used when selecting exporter by extension
	(Bug #535179 - export to png does not use AntiAliasing, now up to user)