DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Save as image behaves crazy

 
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Sun Jan 22, 2017 1:17 pm    Post subject: Save as image behaves crazy Reply with quote

Hi,

When saving an opened DPlot file as image (gif, tiff) I never get an image file of the correct dimensions.

The output seems always to be larger.

When importing an image I prepare it for correct size, with full plot output dimensions in mind. All this is mentally boggling if DPlot can't manage to output an image I tell to be e.g. 1080x1590 pixels (which I know is about A4 size at 150dpi), eventually to become a 150dpi document but dpi settings doesn't seem to affect output dimensions as well.

Anyway, I don't care about the 150dpi: I just need the exported image to have the entered size in pixels. Post-processing in image editor or printer settings will deal with the print size (150dpi info is only useful info for 'true size' but usually the printer software upscales the image dimensions according the set print resolution).

By the way, when exporting a too large image (e.g. 2000x3000pixels) DPlot just keeps being busy and never ends the task.

Can anyone explain the logics of the Save As - image dialog in DPlot or is it not working properly?

Roberto
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Jan 23, 2017 12:08 am    Post subject: Reply with quote

Roberto,
The output is dependent on both the Options>Extents/Intervals/Size command (if you checked "Specify plot size" option) AND the bitmap size options when you save as a bitmap image. If you'll send me an example and let me know what options you selected for File>Save As and also let me know your expected results I'm sure we can get this worked out.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Mon Jan 23, 2017 1:54 pm    Post subject: Reply with quote

Hi David,

From www.robemus.com/temp/PicoLog_Voltage_divider_using_PO-pin.grf you can download an example file I'd like to export as 1180x1630 pixels image. That's 1:1 for including it in a 150dpi A4 document at almost full page fill.

When I export this file as 1180x1630 at 150 dpi gif or tiff the image becomes 3660x2651 pixels.
When I export this file as 1180x1630 at 96 dpi (monitor resolution) the image becomes 2444x1770 pixels.
It makes no sense: 1180x1630 pixels is 1180x1630 pixels, period. The dpi is just some extra info in the exif info of an image: it tells the post-processing software, printer, plotter or whatever how to translate pixels to intended physical size.

IF a size dialog is supposed to offer real output dimensions then the dialog should ask dimensions in inch or cm and dpi. Then the pixels would be calculated accordingly (5 inch at 300 dpi -> 1500 pixels).
But if pixels input is an option then that is the ruling factor: pixel dimensions are fixed.

IF a size dialog offers it all, pixels, dpi and size then one:
• changing pixels then dimensions would automatically adjust according to dpi value
• changing size then pixels would automatically adjust according to dpi value
• changing dpi then pixels would automatically adjust according to set size.
• IF one prefers to have dpi and pixels fixed then he should first set dpi and then pixels

In the file linked to above I have imported an image. Before importing in DPlot I prepared it to size and final dpi: the imported image dialog in DPlot behaves properly as set size is printed in the correct size. However, the imported image looks very large on screen and might be so big it covers part of the curve(s). An export usually looks totally different from what I see on screen. The graph is larger, fonts are smaller as well as imported images (compared to on display).
If I zoom in then an imported image isn't zoomed in together with the graph. Looks like both are using different 'references'; like two different worlds are dealed with (which is actually the case: scale-able graph and fixed size pixel-based bitmap)

When I print a dplot file straight from dplot texts can be on odd locations while e.g. a label point text with a straight arrow towards curve might be printed as text over curve with a sharp angled arrow back towards curve. I included one of those in the file.
I started to anchor all text to data space as it turned out generally more predictable. Anchoring text to print space doesn't make much sense other than for e.g. the plot title.

It's always tempting to do everything in DPlot itself but often it gets more practical to export a naked plot and add the bells and whistles in an image editor. That's ok for crappy cheap software but it's a bit disappointing behavior for $200 software. All the dedicated graph tools are awesome but somehow loads of other software (expensive down to free) manage to get text and object locations properly in print as well as export. It's kind of the fundamental framework of software: once having that right features can be added.
I can imagine it's hard to sync positions of so many different scale-able objects like grid, graph lines between data points, overall text, graph-related text, fill, even bitmap image, etc. so basically the whole thing is an incredible achievement. But somehow added text locations and export remain kind of problematic.

DPlot is not WYSIWYG but 'absolute values' based. Perhaps a useful additional feature would be a screendump based resize and export option: it sacrifices crispyness of the output image but at least the layout will look exactly like on-screen. For some less formal purposes that's beneficial over less predictable layout quality output.
However, taking a screendump is something one easily can do themselves before pasting it in an image editor ... for those who are familiar with image editing Rolling Eyes
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Jan 23, 2017 3:19 pm    Post subject: Reply with quote

Set the resolution to 0 and you'll get the requested dimensions.

I understand this is confusing. It is a product of many users requesting "high resolution" TIF images. I tried explaining that the resolution setting is meaningless, to no avail. But just changing that number and not the image dimensions didn't please anybody, so here we are.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Mon Jan 23, 2017 4:12 pm    Post subject: Reply with quote

Hi David,

Thanks for testing...
Hmm, that's interesting: I tried 0 for dpi yesterday and it didn't work.

Just tried again saving 1180x1630 pixels as gif and tif at 0 dpi.
Result: both 2444x1770 pixels images: exactly 1.5 times too large in width and height.

Uhm.. any ideas? Shocked

By the way: if I enable and set extends/intervals -> specify plot size then the displayed plot on screen is exactly the size I set like above. So screen dpi's (96 dpi) is very well known by DPlot.

- I can't find a relationship between entered pixels size and output size: I thought perhaps dots per inch is mixed up with dots per cm.
- Setting a different general unit of dimensions (inch, mm, points, cm) doesn't affect output size of images.
- Using other values for dpi (0, 1, 96) doesn't affect output size either; only when I use larger numbers than 96 it affects output size (images become larger).
_________________
Roberto
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Jan 23, 2017 4:52 pm    Post subject: Reply with quote

No, I tried just now and got 1180x1630.

I noticed I'm missing an imported image. It would be weird if that's the problem, but...?

Or it may be version-related, though I don't recall making recent changes that would alter this behavior. I've sent a link (email) to the latest in case you don't have it.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Mon Jan 23, 2017 7:04 pm    Post subject: Reply with quote

The imported image is indeed the problem, though I can't explain why off the top of my head. I'll fix this as soon as possible.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Tue Jan 24, 2017 2:33 pm    Post subject: Reply with quote

Hi David,

In the mean time I learned that gif is always 72dpi.
Before I prepared the 'embedded' image for 150dpi in an image editor but apparently the dpi info is not set in the gif during export.

Therefore I did some more tests with tiff, a format which has dpi info in its exif info. Nothing changed, though: whatever image (size and dpi) I import in DPlot, the output dimensions are always too large (actually remains exactly the same).

Exporting the graph with deleted imported image the output dimensions are indeed as supposed. Very Happy

Hope you will have a bright moment and get a hunch of what is causing the issue. Idea
_________________
Roberto
Back to top
View user's profile Send private message
Roberto



Joined: 16 Mar 2008
Posts: 102
Location: Netherlands Beek en Donk

PostPosted: Sat Jan 28, 2017 4:45 am    Post subject: Reply with quote

Fixed in DPlot 2.3.5.5.

Thanks, David!
_________________
Roberto
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group