Templot Club Archive 2007-2020                             

topic: 3310Wrap a picture to a curve
author remove search highlighting
 
posted: 24 Jul 2018 13:49

from:

Steve Lovett
 
Milton Keynes - 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 there.  Simply put I'm struggling to achieve any outcome when trying to wrap a picture to a curve.
I'm following the excellent companion guide but might just be missing something.

I've a png file of a scale drawing which has a straight running line through it.

I've imported this file and saved it as required and have overlaid a control template on it; positioning the peg accordingly.

Now I'm assuming that given the circumstances so far described I do not need to undertake the 'Straighten along the control template option....' and subsequently the need for banding is not required.

I then believe I've saved the 'modified' file correctly as described.

Next step I've created a new file which has a curved alignment over which I would want to wrap my picture file.  It's here where things appear to go awry:

I select my png file, modify shape & wrap along control template.....  Except now I get an error message which seems to imply I do not have enough umph in the system to do the necessary calculations and should maybe reduce dpi etc etc.

I've a relatively new laptop with umph and no other applications open at the time so am thinking I might just be doing something wrong in earlier steps when 'by-passing' straightening step.....

Any thoughts anyone.

posted: 24 Jul 2018 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
Hi Steve,

The file saving instructions are simply to provide a backup of the various stages in case something goes wrong or you need to adjust something and try again. They are not part of the process and are optional.

The image must have been scaled (resized) to match your model scale before you begin. If you are working with the background maps function, Templot does this for you.

You can skip the straightening function if the track line in the image is already dead straight AND it is horizontal on the screen.

If you do skip it, you will need to enter the wrapping offset manually:

wrap13.pngwrap13.png

This is the dimension (in model mm) from the bottom of the image to the track line. You can use the utils > ruler tool to determine this dimension (zoom in and ALT+left click for one end of the ruler, zoom in again and ALT+right click for the other end).

If you use straightening function, it will set the wrapping offset for you.

If you are still having trouble, please post your BGS file here, and the SK81 image file (from the same folder -- you will need to post twice for 2 files). Please also say your model scale.

I will then try wrapping it here. That's the only way I can find out what's going wrong if it crashes the system or Templot says there is a system problem.

cheers,

Martin.

posted: 24 Jul 2018 17:16

from:

Steve Lovett
 
Milton Keynes - 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
Thanks for the quick response Martin.
I'll have another go although I've already picked up on a potential glitch in my working.

[highlight= rgb(246, 246, 255); font-family: Arial, Helvetica;]I've confirmed that the image has been scaled (resized) to match my model scale (P4) - OK
[highlight= rgb(246, 246, 255); font-family: Arial, Helvetica;]

I've skipped the straightening function but although the track line in the image is already dead straight it ISN'T horizontal on the screen; I've rotated this - POTENTIAL GLITCH.

So I've got this straight in my own mind.............. I'll be working with a number of files:

The 'imported' background picture of my track plan (imported as a png and saved as a background picture shape) - the BGS file
A saved 'box' file which represents the curve onto which I want to wrap the BGS file onto

Are you able to confirm which file is the SK81 you refer to as I'm a little lost with that one?

Thanks Steve





posted: 24 Jul 2018 17:42

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
Steve Lovett wrote:
Are you able to confirm which file is the SK81 you refer to as I'm a little lost with that one?
Hi Steve,

The BGS file contains only the size of the picture shape and its position on the trackpad grid.

The actual image is in the SK81 file, which you will find in the same folder as the BGS file, usually your \SHAPE-FILES\ folder, after saving the BGS file. It will be a much larger file than the BGS.

If you have more than one picture shape, it will be in SK82, etc.

cheers,

Martin.

posted: 24 Jul 2018 17:52

from:

Steve Lovett
 
Milton Keynes - 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:
Steve Lovett wrote:
Are you able to confirm which file is the SK81 you refer to as I'm a little lost with that one?
Hi Steve,

The BGS file contains only the size of the picture shape and its position on the trackpad grid.

The actual image is in the SK81 file, which you will find in the same folder as the BGS file, usually your \SHAPE-FILES\ folder, after saving the BGS file. It will be a much larger file than the BGS.

If you have more than one picture shape, it will be in SK82, etc.

cheers,

Martin.
Cheers Martin.
I've tried again but clearly operator error prevails.

The picture attachment shows where I get to before Templot enters 'Not Responding' when trying to Straighten.

I'll attach the images I have separately and describe that which I'm hoping achieve.

Thanks for your patience.
Attachment: attach_2703_3310_Woburn_Screenshot.JPG     156

posted: 24 Jul 2018 17:55

from:

Steve Lovett
 
Milton Keynes - 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:
Steve Lovett wrote:
Are you able to confirm which file is the SK81 you refer to as I'm a little lost with that one?
Hi Steve,

The BGS file contains only the size of the picture shape and its position on the trackpad grid.

The actual image is in the SK81 file, which you will find in the same folder as the BGS file, usually your \SHAPE-FILES\ folder, after saving the BGS file. It will be a much larger file than the BGS.

If you have more than one picture shape, it will be in SK82, etc.

cheers,

Martin.
BGS file 
Attachment: attach_2704_3310_Woburn_Background_Picture_20180724.bgs     178

posted: 24 Jul 2018 17:57

from:

Steve Lovett
 
Milton Keynes - 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:
Steve Lovett wrote:
Are you able to confirm which file is the SK81 you refer to as I'm a little lost with that one?
Hi Steve,

The BGS file contains only the size of the picture shape and its position on the trackpad grid.

The actual image is in the SK81 file, which you will find in the same folder as the BGS file, usually your \SHAPE-FILES\ folder, after saving the BGS file. It will be a much larger file than the BGS.

If you have more than one picture shape, it will be in SK82, etc.

cheers,

Martin.
SK81 File 
I'm trying to wrap this picture onto a -9144.0mm curve
Attachment: attach_2705_3310_Woburn_Background_Picture_20180724.sk81     190

posted: 24 Jul 2018 20:35

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
Hi Steve,

Wow, that image is a massive 78 megapixels (15747 x 4960 dots). I'm not surprised your system got indigestion trying to manipulate it. Mine did too. :(

edit: You may prefer to ignore this and see later below:

 topic 3310 - message 25264


The answer is to use the crop/combine function:

 http://templot.com/companion/crop_combine.php

to chop it into more manageable chunks:

2_241506_150000000.png2_241506_150000000.png

and at the same time remove any extraneous image borders and wasted image space.

Each one can then be dealt with separately.

Ideally don't go above a ball-park size of around 4000 x 3000 for each one.

It's a good idea to switch the picture shape borders on to see more easily what you are doing. The currently selected shape gets a red border when you select it in the list. You can turn them off afterwards.

It's also worthwhile to zoom in and spend some time getting the rectangle vertical edges exactly aligned (shift shape mouse action):

2_241506_160000001.png2_241506_160000001.png

-- this means the wrapped images will automatically align to each other if you are careful in moving the fixing peg for each one.

Make all the rectangle shapes before doing any cropping (and don't delete the underlying image until you have finished cropping all of them :) ).

When all the chunks have been wrapped, you can use the crop/combine function again to create a single picture shape if you wish.

I will have a go at this after a meal and post the results. They won't actually be usable for you because I don't have your track plan, but it will prove the process.

p.s. click the modify shape > convert to 24-bit for deep zooming button before starting work on your image. Although this uses a lot more memory than a monochrome image, it's the default setting which Windows expects, and tends to be universal nowadays. It also allows much deeper zooming over the image on the trackpad. 

cheers,

Martin.


posted: 25 Jul 2018 00:17

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
Hi Steve,

edit: You may prefer to ignore this and see later below:

 topic 3310 - message 25264



If you get the "Templot not responding" message, don't take any notice. If you go away and make a coffee or whatever, when you get back you will find that Templot has come back and the job is done.

I tried straightening and wrapping the 4 image chunks to your -9144mm radius, and here is the successful result:

2_241841_280000000.png2_241841_280000000.png

I have set them transparent so that you can see how they align. But I don't recommend that you leave images transparent while working over them, because it will significantly slow down the screen response and prevent zooming in deep.

Also you can switch individual images on and off by ticking the boxes below the list of shapes. This will speed up the screen response a lot, while you are working over a different part of the plan.

I found that the original was not quite dead straight, it is on 1117569mm radius, as you can see in the BOX file. Not much (over a kilometre on the model!), but noticeable over such a length. I don't know if that is because the prototype is on such a radius (doubtful, that would be 4233 chains radius full size). More likely it has been caused by shrinkage of the original drawing. Either way it needs straightening in order to match the drawn tracks to the required radius. I adjusted the starting control template to match using the swell mouse action at the centre (using the Up Main line):

 http://templot.com/companion/swell_function_ctrl_f10.php

It has worked out quite well, as you can see:

2_241849_470000000.png2_241849_470000000.png

The files are attached in several following messages, if of interest.

cheers,

Martin.
Attachment: attach_2706_3310_midland_central_2018_07_24_2334_37.box     183

posted: posted: 25 Jul 2018 00:20

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
The BGS file.

SK image files to follow. Save them all with the BGS file in your \SHAPE-FILES\ folder.

Then reload the BGS file.
Attachment: attach_2707_3310_midland_central_18_07_24_2330_13.bgs     185

25 Jul 2018 00:20

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
SK81
Attachment: attach_2708_3310_midland_central_18_07_24_2330_13.sk81     182

posted: 25 Jul 2018 00:21

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
SK82
Attachment: attach_2709_3310_midland_central_18_07_24_2330_13.sk82     193

posted: posted: 25 Jul 2018 00:22

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
SK83
Attachment: attach_2710_3310_midland_central_18_07_24_2330_13.sk83     195

25 Jul 2018 00:22

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
SK84
Attachment: attach_2711_3310_midland_central_18_07_24_2330_13.sk84     187

posted: 25 Jul 2018 11:29

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
Hi Steve,

I have returned to this today to try again. Although the process I posted last night worked, it was a lot of faff splitting the image, swapping the control template to and fro, and aligning the fixing peg each time.

I have successfully got this to work on the full image. The following points appear to be key:

1. use the crop/combine function to remove as much of the image borders and wasted image space as possible. Crop as close to the tracks as possible to make the image as small as possible:

2_250612_170000000.png2_250612_170000000.png


2. change the image to 24-bit colour if not already:

2_250559_010000000.png2_250559_010000000.png

I have for years advised using a reduced colour depth or monochrome images for best results. This is clearly now wrong in the latest versions of the Windows GDI*, and I need to update the notes.

It goes against common sense to use massively more memory for full colour unnecessarily, but clearly the GDI is now optimised for this and works much better when manipulating bitmaps in full colour, and when panning and zooming over them.

3. if Windows reports "Templot not responding", ignore it. It took a good 10 minutes on my system to straighten the image, and again to wrap it, but it eventually returned each time with the job done:

2_250611_330000000.png2_250611_330000000.png

2_250613_260000000.png2_250613_260000000.png


I'm attaching below the BGS with the SK81 cropped image already straightened and in 24-bit format, ready for you to wrap onto your track plan. The wrapping offset is 996.6mm (for the Up Main).

cheers,

Martin.

*Graphics Device Interface
Attachment: attach_2712_3310_steve_cropped_24bit_straightened.bgs     168

posted: 25 Jul 2018 11: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
And here is the corresponding SK81 image.
Attachment: attach_2713_3310_steve_cropped_24bit_straightened.sk81     173

posted: 25 Jul 2018 12:52

from:

Steve Lovett
 
Milton Keynes - 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.

What can I say? Your support and patience in making this happen is fantastic. I'm sure that many others will find this journey helpful and enlightening.

I've downloaded the files and hopefully will get stuck into them later today.

I'll let you know how I get on. I just hope that I don't call upon more of your time.....

Regards

Steve



Templot Club > Forums > Templot talk > Wrap a picture to a curve
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