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
Allyn
Posts: 2226
Joined: Sat Mar 30, 2013 4:57 pm
Location: Mississippi Gulf Coast
Contact:

Re: A New Chart Making Program (now with blending)

Post by Allyn »

It certainly has come a long way, and at any point you can say "no mas!"

I think, if you do it, that being able to input what I want is better than doing a drop-down.
_________________________________________________________

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

Allyn wrote:It certainly has come a long way, and at any point you can say "no mas!"

I think, if you do it, that being able to input what I want is better than doing a drop-down.
Never come across 'No Mas' before, but after a quick google, I agree.

I'll see what I can do.

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 (now with blending)

Post by Allyn »

It was a boxing match between Sugar Ray Leonard and Roberto Duran in 1980 that became known as the "No Mas" fight. Since then, the phrase has worked its way into American pop culture meaning "I'm done" or "I quit" usually said in frustration or exasperation, but not always.

http://en.wikipedia.org/wiki/Leonard-Duran_II" target="_blank
_________________________________________________________

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

After a certain amount of jigging of the window and added code (the code behind the thread merge/replace window is now 1440 lines long, which is a moderately respectable program in its own right) I think it's sorted.
Image
So, as before, there are two images off to the right, a 'before' and 'after' image. On the right is the tool section. At the top is the untouched 'Merge' colours section. One thing that's new is the 'Find' button, but I'll come to that later.
In the Replace section is the majority of new stuff. If you want to simply go for a DMC colour, it's as before but with the title 'DMC Replacement Colour'. Below is where most of the work has gone, with ideas Allyn will recognise from the blend selection program I wrote for her.

You type in an RGB colour that you're aiming for. That appears in the coloured rectangle to the right of the RGB edit boxes, which changes with every keypress in the edit boxes, I fear it may slow things on a slow PC, but I hope not.

Below the edit boxes is another coloured rectangle. This is the nearest DMC colour to the one entered (the hint that shows when the mouse hovers over the rectangle gives the DMC colour number and also the RGB values for that colour). This colour can replace the 'Colour to be Replaced' by pressing the 'Replace with DMC' button. The button hint also details exactly which colour is replaced and the one it's replaced by.

Finally there is a drop down list of the 100 nearest blends to the desired colour (in the case shown it's DMC 797 + DMC 995, which give an RGB of 28/110/153). The background colour of each item in the list is the blend colour. The rectangles below the blend show the two thread colours that make up the blend, and the hints give the number, name and RGB of each colour in the blend. Unlike in the program I wrote for Allyn, you can't cycle through the different options that can make the same blend, as it automatically selects the closest pairing, and there is no facility in any part of the chart program to force it to use a particular colour pair for a blend. Finally, to replace the 'Colour to be Replaced' with the blend visible in the drop down list, press the 'Replace with Blend' button. Once again the button hint says exactly what colours are being used to replace the original colour.

I added a little gimmick with the 'Find' buttons. The upper find button helps you find the three 'Merge Colours', and the lower find button helps you find the 'Colour to be Replaced' (if you only want to find one colour, set them all to the colour you want to find). The way the buttons work is to create a new image where the colours to be found flash to their inverted colour every half second and then back. This is shown below when DMC677 has flashed to its bitwise inverted colour, and then after half a second it flashes back to its normal colour:
Image
It is easily visible for largish areas, but single pixels are hard to see, which is why I have also linked it to the 'Original Image' and 'Modified Image' for panning & zooming.
To stop the flashing, press the 'Find' button again - though it will now have the caption 'Stop'. Then the 'Find' image will disappear again.
Oh yes, I have moved the lower 'Find' button since I took the screen capture, so its right edge is now in line with the right hand edge of all the other buttons.

I hope this answers some of the questions & requests in a manner that will get universal approval :wink: . As usual, comments & suggestions are welcome. I shall now start the help file write up and complete that before uploading a revised download. [Isn't English a nutty language]

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 (now with blending)

Post by Allyn »

This looks fantastic! I eagerly await the download so I can try it. :applesauce:
_________________________________________________________

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

Now available for download from http://www.chestnutpens.co.uk/downloads/crossstitch.zip.

Hope it works for you..

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

Image
I have been using Borland C++ Builder 4 Pro as my programming environment since May 2000. I have often wanted to load in graphics, but have been restricted to Windows Bitmaps after reading the programming reference files.

Today. Today, 14 years on, I learn that it already has the capability of opening jpeg photos, but it's an undocumented add-on done at the last moment, less than 2 weeks before release if some very old programming forum posts are to be believed. Seems to be more of a kludge than a well thought through implementation to me, especially given the way it fails to work with ordinary bitmap images. However, despite that, I have found a way of extending the capability of my chart program to read jpegs.

As jpegs are lossy, I feel in no hurry to find a way of saving the converted picture as a jpeg.

It looks like I should also be able to get the program to read Gifs through a third party add-on - the one I have found does it very simply (more so than the undocumented Borland extension), and will implement that fairly soon. It would be nice to think there is an equivalent bit of code available for PNG's and Tiff's.

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 (now with blending)

Post by Allyn »

Okay. My question is why? Why do the additional work to use any other image format? If I were to vote for my choice of second image format, I'd be over here chanting "PNG, PNG, PNG...." but I'd still wonder why a format other than bitmap is needed.
richardandtracy wrote: I have been using Borland C++ Builder 4 Pro as my programming environment since May 2000. I have often wanted to load in graphics, but have been restricted to Windows Bitmaps after reading the programming reference files.

Today. Today, 14 years on, I learn that it already has the capability of opening jpeg photos, but it's an undocumented add-on done at the last moment, less than 2 weeks before release if some very old programming forum posts are to be believed. Seems to be more of a kludge than a well thought through implementation to me, especially given the way it fails to work with ordinary bitmap images. However, despite that, I have found a way of extending the capability of my chart program to read jpegs.

As jpegs are lossy, I feel in no hurry to find a way of saving the converted picture as a jpeg.

It looks like I should also be able to get the program to read Gifs through a third party add-on - the one I have found does it very simply (more so than the undocumented Borland extension), and will implement that fairly soon. It would be nice to think there is an equivalent bit of code available for PNG's and Tiff's.
_________________________________________________________

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

Why is a format other than BMP needed?
Mostly for user convenience. When talking to my wife about image formats she went blank & admitted she had no idea there was more than one format, because a picture is a 'Picture'... It is possible other users of the program may be in the same state of blissful ignorance.

Other formats:
Well, Tiff is one I can't see a real use for. It can have very large files and the compression isn't huge. This is slightly offset by the ability to have multiple pages, but I don't think it's particularly useful.
JPEG is good for high compression of photos where loss of detail is OK.
PNG as a lossless alternative to JPEG & offers much smaller file sizes than BMP.
In its the basic form, BMP is much simpler to program as it hasn't got any fancy compression methods - though over the years run length encoding (RLE) has been added and it has been expanded from 2 colours {with Windows 2} to 24 bit colour, while still keeping the capacity for 16 colours, 32 colours, and 256 colours with or without a palette reference in the file. If you're feeling nerdy, the format is explained here: http://paulbourke.net/dataformats/bmp/

It turns out that I can't seem to get any freebie code that will work on C++ Builder 4 for PNG's. I can get Delphi 4 code for PNG's, which made me hope for a while as Delphi & C++ Builder were comparable products sold by Borland, and shared many of the function libraries, effectively making syntax the primary difference between them - also they used the same compiler. The Delphi 4 code I can get unfortunately seem to use a number of the relatively few functions that are not shared between the two development systems, which probably explains why they didn't claim CB4 compatibility... Rats.
C++ Builder 5 came with PNG support built in. But I don't have that version. :tantrum:

So, I fear PNG support is not going to be possible unless I can dig the format out and programme it myself. This, I must say, is highly unlikely. I will look further for available code though.

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 (now with blending)

Post by Allyn »

I am very familiar with the other formats and what they're used for. :) (graphic artist here) My question is why are you doing this instead of stitching? The program works with bmps. Why isn't that enough? Go do some stitching!
_________________________________________________________

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

:thinks:
Dunno really.

Well, I do.
I'm doing this at work. We have had a couple of intensive years designing & testing boxes ordered before the 2008 financial crash. That work has now come to an end on the design side & we are into production. Due to the long lead time on the high value items we're making boxes for (communication satellites etc.), the design work for follow on boxes is delayed, because the contents have been delayed due to the 2008 crash - so we're beginning to feel that crash now. We have run out of company jobs to do, and are now on home projects in work time until the next contracts come on stream. Unfortunately doing stitching is just too non-technical to do at work regardless of the fact I have only a few work related tasks at the moment...

This will pick up in the new year, we are negotiating on boxes for offshore helicopter related parts. The contract for 1000 or so boxes is waiting on a finalised spec, but we are the only supplier the customer is now talking to - so it's their internal procedures that's holding it up & giving me time to programme.
There is a secondary factor - our production space is full to bursting and cannot cope with a new design too soon. Have you any idea how much factory space a 30ft x 12ft x 10ft satellite container takes while being built? The way we do it means it takes what feels like half an acre (or about 1/3 the factory space) for all the bits to be laid out flat and welded up while still having safe access and safe arc shielding curtaining around the frames, and this stage can take 3 months per box. The space reduces as the frame comes together, but it's a huge obstruction in the factory none the less.

Regards,

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

New version up with capability to read jpeg, gif and emf. (same link as before)

Why EMF? Well, no reason other than it was built into the software, so as I was implementing the others, I did that too. I have never come across an emf file used anywhere, so it was probably entirely pointless - but what the heck?

The png software I had high hopes of this morning proved to be tricky, calling up potentially buggy library headers that I have never used before. Anyway, it ended up failing to work due to being unable to resolve an ambiguity between two functions, and as it was way past my programming ability to fix it, I said 'forget it'.

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Mabel Figworthy
Posts: 32994
Joined: Fri Mar 07, 2008 4:05 pm
Location: Dunchurch, UK
Contact:

Re: A New Chart Making Program (now with blending)

Post by Mabel Figworthy »

I have just been reading through this entire thread and am IN AWE!!!!!!!!!
Visit Mabel's Fancies at www.mabelfigworthy.co.uk
WIPs
Elizabethan Beauty, RSN Certificate & Online
Waiting
Soli Deo Gloria, Mechthild, bling unicorn, goldwork & silk shading kits

Flights of Fancy (blog)
Mabel's FB page
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

So am I - That you could stick it through! :lol:

If you feel it could be useful for you, please download it. I think it's starting to be quite useful now.

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Mabel Figworthy
Posts: 32994
Joined: Fri Mar 07, 2008 4:05 pm
Location: Dunchurch, UK
Contact:

Re: A New Chart Making Program (now with blending)

Post by Mabel Figworthy »

Thanks Richard, but I'm afraid I mostly design Hardanger now, so all that great functionality would be rather wasted on me! (Although I am actually using an antiquated cross stitch program to chart my designs...)
Visit Mabel's Fancies at www.mabelfigworthy.co.uk
WIPs
Elizabethan Beauty, RSN Certificate & Online
Waiting
Soli Deo Gloria, Mechthild, bling unicorn, goldwork & silk shading kits

Flights of Fancy (blog)
Mabel's FB page
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

After a couple of concerns about the accuracy of the detailed key in the printout when using blending (noticed by me, Allyn and Tiffstitch) I have had a pretty good look at the program's innards while doing blending, and I think all the cross references etc are correct. In order to do this I added three temporary windows to the program so I could dump out the contents of the various arrays held in memory. Using a simple image I drew with 3 blended colours, I went through the whole lot by hand to work out what I expected to see. And it nearly correlated with the output in the print preview window.

I am 95% certain, though not completely, 100% definitively certain, that the concerns were caused by truncation of the blend names in the print preview window/printout so that the blend number did not appear in the blend name. To cure this I have added a small routine to change the blend name to start with the closest pair and truncate the less compatible pairs if truncation is needed. After this modification, in the detailed key the DMC# value should ALWAYS be the same as the first pair listed in the DMC Name/Blend Option column. If it is not the same, please let me know and I would appreciate it if the original & converted image could be sent to me somehow so I could find out why.

Anyway, there is a new, corrected, version of the program directly downloadable here: http://www.chestnutpens.co.uk/downloads/crossstitch.zip

Regards,

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

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

It appears that not all of the shapes I programmed in for the various thread numbers meet universal approval. So, I have added the ability to change the shape used for each thread number. Not being able to think up a very elegant method, it's just a matter of editing a text file that is held in the same directory as the program's exe file. Full details of how to do it are given in the .chm help file.

I have left an 'Image Editor' accessible. It has no functionality at the moment, but I'm trying to add in an image editor equivalent to MSPaint in capability, so that very basic editing can be done within the program, and possibly allow you to start with a blank canvas if you are that determined!

Regards,

Richard.
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
lavenderbee
Posts: 2409
Joined: Tue Nov 18, 2014 4:51 pm
Location: North Wales

Re: A New Chart Making Program (now with blending)

Post by lavenderbee »

Richard, it gives me a headache seeing what you do. Brilliant. :applesauce: :applesauce: Don't know how people do that, you must be so tech minded. Very well done. I just plod on in my own way but do love to see what people create. Great to see such creativity. :D
lavenderbee :-)


stitching is beewitching

Things only become problems if you let them
User avatar
richardandtracy
Posts: 5419
Joined: Wed May 28, 2014 4:27 pm
Location: Kent, UK
Contact:

Re: A New Chart Making Program (now with blending)

Post by richardandtracy »

Well, I pretend to be a professional mechanical engineer, and after about 27 years in industry, no-one has broken my cover, so I suppose I must be one. I would hope that all engineers are relatively tech savvy, even if they don't often apply it in the field of stitching. However, all my programming is self taught, so may not use the most efficient techniques available.

Regards,

Richard
http://www.chestnutpens.co.uk
Free Charting Program for PC's Info Zip Installation
User avatar
Rose
Posts: 34059
Joined: Sun Mar 05, 2006 12:24 am
Location: Gilroy, CA

Re: A New Chart Making Program (now with blending)

Post by Rose »

I just had a look at this subject. I did not look before because I am very pleased with my PC Stitch 10. But it keeps popping back up so thought I would have a look. After reading the first post I have a small concern. You say that you used a program that someone/company developed and then you took it and changed. You did not say if they have given you permission to make these changes and provide them for free. This is no different then a chart or kit. I am sure they have a patent or something on there design and you would need to get permission from them for your changes and also to distribute it. It is intellectual property and they have the right to control it. As I say I don't know if you have this permission as you have not said but I think to protect the forum from being entangled in possible complaint I am just asking. Please let us know if you have these permissions.
If you are looking for some one to help change you, look in the mirror
Post Reply