Templot Club Archive 2007-2020                             

topic: 1554Image Output (PNG) Generation from the TDV
author remove search highlighting
 
posted: 3 Jul 2011 14:17

from:

Brian Nicholls
 
Poole - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Hi Martin,

I have a query on generating an output PNG image (or maybe any image using output in the TDV).

I wanted an overview of my track plan and track-work combined so that I could import that into Autocad in order to modify a copy of the original station layout.

It all appeared to work quite well, except that I found the top area of my track plan had been cut off (see attached files for clarity).

The first image is what I actually wanted, and the second image is what was generated by the TDV.

Now I adjusted the width dots from the default 4000 to 10050 to get the whole thing in view.
However, there is no adjustment for the height of the image, what do I need to do to get the whole image I require.

All the best,

Brian Nicholls.

 

1853_030913_290000000.gif1853_030913_290000000.gif


1853_030914_360000000.gif1853_030914_360000000.gif


posted: 3 Jul 2011 15:16

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Brian Nicholls wrote:
Now I adjusted the width dots from the default 4000 to 10050 to get the whole thing in view.
However, there is no adjustment for the height of the image, what do I need to do to get the whole image I require.
Hi Brian,

In TDV # 3143:

Zoom out to display all of the area you wish to include.

At the top of the workpad, click the boundary rectangle tool-button, and draw a rectangle on the workpad to contain it.

Then on output > export a file... dialog, click the boundary rectangle option before creating the file:

2_031010_560000000.png2_031010_560000000.png

Alternatively you can click the draw new rectangle button on the export dialog, or click the set... button to enter the actual dimensions for the rectangle.

I shall be uploading a new TDV shortly which includes similar options for the sketchboard.

regards,

Martin.

posted: 3 Jul 2011 15:32

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
p.s. Brian,
I wanted an overview of my track plan and track-work combined so that I could import that into Autocad
I don't know AutoCad, but I imagine it can import metafiles.

You may get a better result by exporting in EMF metafile format rather than PNG. This allows zooming in the CAD program without the image breaking up, in a similar way to the DXF export.

But unlike DXF, the EMF format can include your scanned picture shapes, diagram-mode tracks, output colours and line thicknesses, etc.

regards,

Martin. 

posted: 3 Jul 2011 15:39

from:

Brian Nicholls
 
Poole - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Hi Martin,

Many thanks for the prompt response.

The boundary setting worked a treat, and I got just what I wanted.

All the best,

Brian Nicholls.

posted: 3 Jul 2011 15:49

from:

Brian Nicholls
 
Poole - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
I don't know AutoCad, but I imagine it can import metafiles.
Hi Martin,

Just read your second message.

You are correct in assuming Autocad can import metafiles.

It can handle both EMF and WMF file formats, so I have a choice.

I am about to experiment with both these types of files, although I have already done a couple of outputs to each metafile format (EMF & WMF) just before I did the PNG output, but will now investigate further in the light of what you say.

Many thanks again Martin.

All the best,

Brian Nicholls.

posted: 3 Jul 2011 16:07

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Brian Nicholls wrote:
The boundary setting worked a treat, and I got just what I wanted.
Hi Brian,

I'm glad it worked. :)

In the next TDV update there are new mouse actions to move the image boundary rectangle and adjust each edge individually, for precise positioning.

regards,

Martin.

posted: 3 Jul 2011 16:28

from:

Brian Nicholls
 
Poole - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Martin Wynne wrote:
But unlike DXF, the EMF format can include your scanned picture shapes, diagram-mode tracks, output colours and line thicknesses, etc.
Hi Martin,

Have tried several times to export an EMF file to get the result I want, but all I get is the track-work, with no background layout plan (The same also happens with the WMF file format).

Below, I have attached two files, the first is showing the settings I used to create the EMF file, the second is a screenshot of the result I get, and as you will see, no layout plan.

I am not quite sure what is going wrong. :?

All the best,

Brian Nicholls.
 

1853_031126_140000000.gif1853_031126_140000000.gif


1853_031126_490000000.gif1853_031126_490000000.gif


posted: 3 Jul 2011 17:10

from:

Martin Wynne
 
West Of The Severn - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides
Brian Nicholls wrote:
I am not quite sure what is going wrong. :?
Hi Brian,

Most likely metafile breakover, see: message 9518

In order for the EMF file to contain any of the background image, the boundary rectangle must include all of it.

This probably won't be the case if you use the fit to templates option, so you need to use the boundary rectangle option, and draw a rectangle large enough to contain all of the image.

This assumes of course, that AutoCad will display images in metafiles. You can test your EMF file by adding it as an item on the sketchboard.

regards,

Martin.

posted: 4 Jul 2011 00:01

from:

Brian Nicholls
 
Poole - United Kingdom

click the date to link to this post
click member name to view archived images
view images in gallery view images as slides

Hi Martin,

Many thanks for the information.

Unfortunately, having spent quite some time reading about file formats etc. used by Autocad, I found two significant things.

First, I made a mistake when I said that it could import EMF files, it cannot ! :(

Second, although Autocad can import WMF files, when doing so, it only uses the vector information and ignores the image data. :(

So will have to think of another way of getting past the problem.

I can import image files into Autocad and put them onto a layer, I can then load in the DXF file generated by Templot, but at this time I cannot get the two to link and align.
Also there is a prolem of overlaying the DXF file.

I can draw directly onto the image file and produce a DWG or DXF output but, need to get the track-work showing on the drawing produced, which it wont at this time.

Anyhow, I am certain there is nothing wrong with Templot and all the problems are at my end.

I have found all the image file generation outputs from Templot work perfectly OK irrespective of file size, and even my large 420 MB layout plan generates OK in BMP and PNG formats. :thumb:

I will certainly try the Sketchboard approach for testing EMF and WMF files, but this will be tomorrow as it’s getting rather late.

All the best,

Brian Nicholls.



Templot Club > Forums > Development doings - archive > Image Output (PNG) Generation from the TDV
about Templot Club

Templot Companion - User Guide - A-Z Index Templot Explained for beginners Please click: important information for new members and first-time visitors.
indexing link for search engines

back to top of page


Please read this important note about copyright: Unless stated otherwise, all the files submitted to this web site are copyright and the property of the respective contributor. You are welcome to use them for your own personal non-commercial purposes, and in your messages on this web site. If you want to publish any of this material elsewhere or use it commercially, you must first obtain the owner's permission to do so.
The small print: All material submitted to this web site is the responsibility of the respective contributor. By submitting material to this web site you acknowledge that you accept full responsibility for the material submitted. The owner of this web site is not responsible for any content displayed here other than his own contributions. The owner of this web site may edit, modify or remove any content at any time without giving notice or reason. Problems with this web site? Contact webmaster@templot.com.   This web site uses cookies: click for information.  
© 2020  

Powered by UltraBB - © 2009 Data 1 Systems