A New Chart Making Program. Update 21 Feb 2018

For all topics which do not fit in the other categories.

Moderators: rcperryls, Rose, karen4bells, Serinde, Alex

User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

I've been noticing that too.

I have done a step-by-step trace of that bit of the program and it prints it. When you see the 'Print Preview', it is using the same routine, just directing the output to an image instead of the page, and the title appears there. I am baffled.

I shall experiment with writing the text to the page after the image, and see if it's wiping the text out first. On smaller thread count images, the text appears.

As I said, I'm baffled.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

SteveM wrote:I just noticed a small quirk. When I'm in the "Convert Picture to Thread Colours" window I might have "Actual # of Blend Colours 418, from 462 thread colours", but when I apply a merge it changes to something like "Actual # of Blend Colours 249, from 462 thread colours". The number of thread colours is no longer correct, though when I'm done and view the image details it is correct there.
Ahh. I see where the problem is.
  1. In the thread conversion method an array is set up indicating which colour threads used.
  2. The colours are then merged, using a method which cannot see that array.
  3. The colours are then counted in a method shared between several windows, and the result put in a label caption.
  4. Finally the unmerged array is checked for the number of threads used and the result is tacked on the end of the label.
This will need re-jigging. I'll see what can be done to do the job as fast as possible - but I fear it will add some time to the conversion as fully counting all the colours after they have been decided will take time.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

Corrected the error mentioned above and added a histogram function in several places to give more information about a conversion and the resulting number of colours in a 10x10 square. The sort of output is as below:

Code: Select all

Max. No. colours in 10 x 10 square: 53 at X = 100 Y = 220
Ave. No. colours in 10 x 10 square: 19.1
Min. No. colours in 10 x 10 square: 3 at X = 130 Y = 40

Breakdown of number of colours in a 10x10 square (rounded to nearest %):
1	>   0%
2	>   0%
3	>   0%
4	>   0%
5	>>>>>>>>   1%
6	>>>>>>>>>>>>>>>>>>>>>>   3%
7	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   5%
8	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   7%
9	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   5%
10	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   4%
11	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   4%
12	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   5%
13	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   4%
14	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   4%
15	>>>>>>>>>>>>>>>>>>>>>>   3%
16	>>>>>>>>>>>>>>>>>>>>>>   3%
17	>>>>>>>>>>>>>>>>>>>>>>>>>>>>>   4%
18	>>>>>>>>>>>>>>>   2%
19	>>>>>>>>>>>>>>>>>>>>>>   3%
20	>>>>>>>>>>>>>>>   2%
going right up to a possible 100 colours in a 10x10 square.

The download is available now.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

Everything looks good to me.
  • The thread colour count now updates correctly
  • The histogram is much faster
  • The PDF is printing correctly again
I really like that you've added the histogram to the conversion window as this is where I spend most of my time. That and it helps to see the impact of changes immediately and not have to wait till I'm back to the main window or print a PDF to get all of the stats. This may be more information than some people care to delve into, but it also doesn't get in their way if they don't care to look at it.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

In some ways the entire program is more than people want to delve into..!

I have not been able to trace the title problem. The fact it works now is as baffling as the fact it didn't. I am utterly stumped. Maybe I shouldn't have admitted that, given that it now works. :thinks:

Glad it works, though.

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

When I tested the print to PDF earlier I did a print preview first and everything looked fine there and after printing. I've just tried again with a fresh instance of the program and skipped the print preview and now the title and copyright info has gone missing from the PDF.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

I have 2 pdf printers on my machine, PDF Creator and PDF Complete. The text is more likely to appear with PDF Complete. I'm wondering if it isn't an interface problem between Blend Threads & Windows or between Windows & the PDF printer driver rather than an internal BlendThreads program error. It also seems more likely to happen if the print job is large, and with a printout of everything (all options ticked in the 'Print Document' window) I've had print jobs of over 100Mb for a 30 page chart.

Wish I had any idea of how to tackle this, because I have traced the program steps for a printout where the title disappeared, and the text & co-ordinates were correct. It should have been there. :tantrum:

There may be a way round it by the user printing out the first page as one print job, the rest of the chart being a second, and then using something like 'PDF Split and Merge' to stick the bits together. It isn't very satisfactory though.

Regards,

Richard.

Edited to add
After a bit of testing, it may caused by something inside the program. Every test where I didn't do a preview of the front page, it failed to print the text, and every test where I did, it did print. So, I'm going to experiment with an automatic invisible preview when printing the front sheet and see how that does. It's a kludge, but because I cannot trace the cause, it's the only one I can think of.

Edited again to add:
Hrrumph. Didn't work. I am very stumped.

Edited yet again:
Next issue will go back to the original method of printing directly to the printer as opposed to sharing a routine with the screen. The additional de-referencing of the writing method to share it with the print preview obviously is none to successful, so now have 2 methods to print the front page, one that prints on paper and the other that prints to the screen. As they are almost identical, it shouldn't cause grief. I hope...
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by SteveM »

I am seeing the issue on two different computers with different PDF printing software. It started with the first release having the histogram so it does seem likely to be caused by a bug in the program, possibly in a library.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

I have spent a fair bit of time over the last couple of days doing the following:
  1. Sorting the Title Page bug. The solution was to have 2 separate routines, one dedicated to the printer and the second to the print preview. It shouldn't be necessary... :tantrum: I changed to a combined method when I put in the 'Print Preview' in Nov 2014, and something is now interfering. Anyway, I had left the code in place, just commented out such it didn't compile, so I could do a roll back if I needed. Thank goodness I did.
  2. Corrected bug which gave wrong number of pages for 'Stitch Information on each Chart Page' when generating the chart document contents page, as a result the Fabric Details were occasionally indicated on the wrong page.
  3. Speeding up the generation of the 'Stitch Information on each Chart Page'. This is the section of the printout just before the fabric details, that shows how many stitches of each colour are on each page. It was very slow. No, it was awful, so awful it was almost unusable on big images with high colour counts (where you need it most). Part of the reason was that in order to get the information to print out a page, it was having to analyse the whole image so the page could be formatted correctly. I have made sure this analysis now only happens once, just before the start of the printout (when you get the message 'Calculating number of Pages'). This has sped the calculation time up by a vast amount - on a large, high colour count picture with a fast machine the saving can be around 10 seconds per page with possibly 28 pages... That is 3 minutes chopped off the time printing or generating the print-preview of the chart.
  4. For pictures with blends, the 'Stitch Information on each Chart Page' only told you what blends are used on each page, and gave no indication of which floss colours are needed on each page, so I have added a bit to the end of the 'Stitch Information on each Chart Page' which specifies which floss colours are needed for each page. After the trouble SteveM seems to have had to go though to buy the floss colours for the top row of his 'Ionian Mission' picture, I came to the conclusion I needed to do something about it. The fact a floss colour is used on a chart page is now shown by a tick or a cross, as below:
    Image
    The calculation is done immediately after the 'Stitch Information on each Chart Page' and on my machine adds 0.05seconds, so the overhead caused is very small. I checked the time because I was concerned that I'd waste a significant amount of the time saved by re-jigging the 'Stitch Information on each Chart Page'.
  5. I added two more symbols to the available symbol list, #600 and #601. These are the tick & cross used above, and are primarily for the new blend component list just mentioned, but I thought that they may as well be available to users to select for their charts too.
  6. Changed the colour calculation method in the 'Fabric Details' printout section to determine the peak number of colours in any 10x10 square to be as fast as it is elsewhere in the program. This saves quite a few seconds per printout.
Now, I wish I could say I've uploaded it, but for some reason I cannot get access to the upload feature on my website. I will try again regularly.

All in all, I've edited/added about 1000 lines of code out of the 27700 in the main window, so this is a fairly significant update even if most of it is not visible. I do hope these changes will speed the program up and make it a little less frustrating to use.

Just rambling now:
The novel 'The Black Robe' by Wilkie Collins is a moderate read, and has been scanned in and converted to text by Project Gutenburg. The book is 627,715 characters (including the PG preamble which is a couple of thousand characters). In comparison: The source code for the main window of this program is 1,710,065 characters, and the image editor is 1,109,332 characters. Or together they are 4.5 times as long as a well known novel. And unlike a novel, every character has to be correct. I sometimes wonder if I'm in the wrong business.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Utility Update 10 Feb 2016

Post by richardandtracy »

Upload success, so the revised program file can now be downloaded from my signature.

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update 5 Mar 2016

Post by SteveM »

Everything looks good so far. I did a print with "stitch info for each chart page" turned on and it wasn't noticeably slower than a normal print but did grow the PDF by nearly 300 pages. I think I stopped using it because of the slowness and the large files were not necessary for early pattern development and tool evaluation. What I'll do is keep two copies of the pattern, one with the details and one without so that I can reference the big PDF when needed and the smaller one the rest of the time.
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 5 Mar 2016

Post by richardandtracy »

That's a logical approach.

I am astonished by it growing the number of pages by 300, but you have an absolutely stupendous number of colours and page count.

I will now go into my corner and continue to shake my head.

Regards

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update 5 Mar 2016

Post by SteveM »

Only 30 pages with this pattern using 60x80 page size. But yes, I like to stress test. :computer:
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New Chart Making Program. Program Update 5 Mar 2016

Post by Allyn »

richardandtracy wrote:...I will now go into my corner and continue to shake my head...
Ha! And you thought you'd reached your limit when you met me, huh. :)
_________________________________________________________

WIP
Image
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update 5 Mar 2016

Post by richardandtracy »

:wink:

Made me smile. Thanks.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update14 Mar 2016

Post by richardandtracy »

I have updated the program as a result of this thread: http://www.crossstitchforum.com/viewtop ... =3&t=28491 to include a full size mockup image that looks as if it has been stitched.

The mockup is drawn as close as can be managed to the way stitches are actually applied to the fabric. Firstly the fabric colour is painted over the background. Then each stitch square is filled in. For tent stitches two lines are drawn, bottom left to top left of each square, the first line is a shadow line offset from the centreline of the square, and then the colour line is drawn over the top. For a full cross the tent stitch is drawn first, then another line from bottom right to top left is drawn, once again shadowed. Where the background is not stitched, no stitches are shown.
This is the result of applying it to the Uranos Drops image I did in 2014, and actually has come out remarkably close to the finished result. The image below is a reduced size forum display - I'm not sure how to get it to display at full scale, and it should come out at 17" high...
Image
The mockup can be got to from the thread conversion window (press the new 'Mockup' button), from the main menu (Image Info| Full Size Mockup Preview) and from the Image Editor (View| Full Size Mockup Preview).

It feels like 'brochure engineering' to me - in other words something that is done solely for the look of it rather than for any practical purpose. However, it gives a good, immediate, preview of what the end result should look like, so may be a bit more useful than a bit of brochure engineering.

Anyway, I hope it works for you. Link in my signature.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
SteveM
Posts: 242
Joined: Mon Jul 20, 2015 6:31 am
Location: Oregon

Re: A New Chart Making Program. Program Update14 Mar 2016

Post by SteveM »

Ok Richard, you've really outdone yourself this time.

Forget about the mock-up button for a moment, the ability to change floss pallet and fabric count in the conversion window makes this an even better "what if" tool than before. I still reserve the right to run four instances of the program at the same time though for best side-by-side comparisons.

The mock-up window is absolutely a delight, PM's stitch mock-up is a child's toy by comparison. I like that the amount of fabric showing changes based on fabric count, stitch type, and threads used. Just marvelous! And as much as I find myself wanting a zoom feature, I figure it isn't needed because the whole point is a true to life representation which is what I am getting. About the only suggestion I could possibly think of is to allow changing the fabric color and selecting a stitched background, but I could get by just fine without that.

Well done!
-Steve

__________________________________________________________________
WIPs: HAED "Mushroom Inn" & "The Ionian Mission"
Finishes: Dim. Gold "Woodland Winter" & HAED "SK History of Chocolate"
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update14 Mar 2016

Post by richardandtracy »

Steve,

I know what you mean about the zoom, I found myself wanting it yesterday as I was testing the mock-up window. I had promised an update deadline, so it was a feature I had to let go for the deadline. I'll see what I can do about it.

It hadn't occurred to me to offer the chance of changing whether the background is stitched or not. I'll implement that.

The background fabric colour is a bit more difficult. Chiefly because it's a bit of a kludge I've not really sat down to think through properly. When I started the program as a chart printer (nearly 3 years before the point at which I added its own capability to do the thread conversion), I wanted the program to automatically choose a colour from within the colours in the converted image for the fabric, and do this from a list of potential fabric colours. That way I could avoid doing so much stitching.
Roll on nearly 5 years, and the situation hasn't changed a bit. The fabric list only has DMC colours listed for the fabric colours, there is no way for the user to see the list of colours, no way add to them from within the program or for the user to over-ride the automatic choice other than tick the 'Show Background' checkbox.

I think that in order to do something sensible about it, I'll have to comprehensively address all the problems and add in another 'wouldn't it be nice' feature. The 'wouldn't it be nice' feature I'm thinking of is to overlay the stitching on a photo of the real fabric that the user can take themselves. When I did my Uranos Drops image, I did it on special patterned fabric and used a graphics package to generate the mock-up below.
Image going to: Image
This will provide an accurate mock-up for fancy fabrics too.
I'm not sure how possible this is going to be, but I may be able to do it. I am open to suggestions as to the user front end of how this could be done. I suspect a converted colour will need to be selected as transparent, then the image drawn over the top of the selected fabric colour.


Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
richardandtracy
Posts: 5445
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program. Program Update14 Mar 2016

Post by richardandtracy »

I have been mulling the program over with some colleagues. Two (non-stitchy) colleagues seem fairly enthusiastic about it, one feels I should try to commercialise it asap, and another feels I should change the orientation of the program quite a bit before I even begin thinking of doing that. The suggestion of the latter gent is that the program main window should be the 'Image Editor', as it's a much more familiar type of experience than the rather odd three pane view of the current main window (however logical the reasons might be behind it). I've never had real experience of selling programs; the only one I have sold was a program I wrote in 1983 for the Sinclair Spectrum to teach DNA replication, which was bought by an educational supplier to kill it so it didn't compete with their less good competitor program.

Is 'BlendThreads' or a development of it likely to be good enough to hold its own against with commercial programs?
It's almost impossible to be objective about your own work. My opinion is that in most categories it's way in advance of PC Stitch 10, but it's hopeless in the 'I'm a novice computer user who wants to stitch basic cute stuff' market, particularly because of the way it doesn't try to hide the technical stuff from the user. Is there much of a market for the technical programs?

Whether the Image Editor becomes the main window or not, I think a stitch library would be useful for the image editor, as would the option to display stitches in the same way as found in the mock-up view, both of which may enhance its commercialisation.

Can I ask, do you think I'm barking up the wrong tree with even thinking about commercialising the program?
I am not looking to make anything more than a bit of pocket money if I ever get that far...

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New Chart Making Program. Program Update14 Mar 2016

Post by Allyn »

I thought from the very beginning that this is something you should develop to sell. It's a bit sophisticated for the 14-count twee-cute stitchers. There's nothing wrong with twee-cute, but there are plenty of basic xs programs out there to handle their needs. This is a program for the 'Golden Kite' stitchers. It's a much smaller target audience, but one used to paying more to get what they want.

If you go that route, I agree the program launch should be less clunky and I still lament that I can't use my XS symbol fonts. I know you said there is a limitation in the program that doesn't allow the use of fonts, but I still miss using them. Maybe if there was a way to import an icon of a symbol to add it to the symbol list.
_________________________________________________________

WIP
Image
Post Reply