Introducing the new LiveCode stack file formats…JPEG & PNG?

by Neil Roger on May 30, 2014 15 comments

You might be wondering “What is this guy talking about??” or “Image formats for LiveCode stacks, eh?”. Well don’t worry, we’re not changing anything. Read on and all should become clear.

This does bring me onto a rather interesting point and one of the things that can make working in technical support quite a challenge at times….receiving a screenshot of a script and being asked “Why is it not working?”

“Urghh….”

Let me start of by saying that we are always happy to help when it comes to Tech Support. For basic issues, we are generally able to push, point or shove you (but gently) in the right direction. When we receive more advanced queries such as, full hard crashes of the IDE or very specific bugs we require a “recipe” which we can follow in order to reproduce and effectively troubleshoot the issue.

I am very glad to say that the majority of our users are happy to supply a stack file and an easy to follow recipe when reporting these issues, but there have been times when we receive…wait for it…a screenshot of the script.  Now you might be thinking, “What’s wrong with that?”…Well let me tell you 🙂

A screenshot, even though it may contain the troublesome script, requires a substantial amount of time to re-type, as you cannot select the text contained within. This especially becomes very difficult to manage when there are 100’s of lines of script across multiple screenshots.

We then have the added problem of effectively reproducing the issue as, even though we have copied the script correctly, there could be an underlying stack issue causing the problem.

It’s not just direct support that experience this Screenshot phenomenon, I have seen specific LiveCode forum posts of scriptshots which are either questions being asked, or replies to questions :(. This can  really frustrate both beginners and advanced users alike.

With that being said, we at RunRev are not perfect and I have ,  in the past, come across some tutorials on our lesson portal where the scripts have been in images (although I cannot locate these anymore… *phew*).

There is reason behind my rant. I would like to let everyone know of an awesome piece of kit that has made receiving screenshots scripts less daunting than it used to be.

For users of the Google Chrome browser, there is an extension called “Project Naptha”

http://projectnaptha.com/

Project Naptha, as their website states, “applies state-of-the-art computer vision algorithms on every image you see while browsing the web. The result is a seamless and intuitive experience, where you can highlight as well as copy and paste and even edit and translate the text formerly trapped within an image.”

What this essentially means is, that you have the ability to copy text from an image as if it was a text document….(what witchcraft is this I hear you scream!)

When I first saw this advertised, I was very sceptical and thought it was just going to be another attempt at some OCR that would soon vanish into the ether…how wrong was I!

Let me give you a brief demo to show how amazing this is-

You start by adding it to Google chrome via the “Add to Chrome” button on the Project Naptha home page. This is shown below-

Screen Shot 2014-05-21 at 15.44.47.png

After this has been added, I would recommend restarting your Chrome Browser although it should automatically start working on any new tabs you create.

Now, here comes the magic….Navigate to an image on any webpage that contains some form of legible text. As an example I uploaded the following image to the techsupport on-rev account.

http://techsupport.on-rev.com/napthaTest.png

naptha.png

Now, you should notice that if you however over the image, it changes from an arrow to a text selection icon.

You will then be able to copy & paste the text to your hearts content. Simple.

Screen Shot 2014-05-21 at 16.10.22.png

(mind = blown!)

Not only is this a great extension for extracting LiveCode scripts, but if you are interested in design work (e.g.Photoshop) and you want to replicate an image that contains text, open the source image in Chrome and you will be able to copy the required text directly.

Screen Shot 2014-05-21 at 16.08.34.png

selecting text in any image is easy

Another neat feature, that I discovered when writing this post, is that you have the ability to automatically remove text from images!!!! Simply select the text you wish to remove, right click —> Translate—>Erase Text….. Wow!

cool.gif

:O

I do have to admit, that although this has completely revolutionized working with text heavy images for me, it does have a few quirks (e.g. wrong character returned, characters not recognised) but even with these quirks I will not be removing it any time soon. I’m sure things will only get better.

Hopefully you will find this Chrome extension useful and, if you do decide to use it, please let me know in the comments below. I would also love to hear from you if there is anything specific that makes you go “urggh…..” when either communicating with the users of an app you’ve created or generally trying to find answers to any scripting issues you have.

Neil RogerIntroducing the new LiveCode stack file formats…JPEG & PNG?

15 comments

Join the conversation
  • Mikey - May 30, 2014 reply

    The good news for me is…you will never get another straight-up script again, and I will immediately change my script editor font to something awesome.

  • Dave Kilroy - May 30, 2014 reply

    that technology is insanely cool – mind=blown & jaw=dropped

  • Scott Rossi - May 30, 2014 reply

    OMG. Witchcraft indeed. If I had known these dark arts were so cool, I would have applied for a coven membership years ago.

  • Richmond Mathewson - May 30, 2014 reply

    It can:

    Access your data on all websites

    Access data you copy and paste

    I wonder if that is not a bit “expensive”?

  • Curt - May 31, 2014 reply

    Though at least he discusses the how & why of this in the ‘Security and Privacy’ section (scroll way down).

    Richmond Mathewson - May 31, 2014 reply

    Aye, Ah tak a glisk at that; still gars me tae grue someqhat.

    Neil Roger - June 2, 2014 reply

    The way permissions are worded for chrome extensions does make them sound pretty overkill, but it is great to see an explanation of why they are needed by the developer.

    There is also a great lifehacker discussion on chrome extension permissions at the following link-

    http://lifehacker.com/5990769/why-do-chrome-extensions-need-to-access-all-my-data

  • Dennis - May 31, 2014 reply

    Interesting, the output is not the expected…

    on createVideoP|ayer
    mobi|eContro|Create “player”
    put the result into sP|ayer|D
    mobi|eContro|Set sP|ayer|D, “rect”, the rect of image “offer
    ||D “visib|e” “true
    mobi|eContro|Set sP|ayer|D, “visib|e”, “true”
    mobi|eContro|Set sP|ayerlD, “showContro||er”, “true”
    end createVideoP|ayer

    on de|eteVideoP|ayer
    if the environment is “mobile” then
    mobi|eContro|De|ete sP|ayer|D
    end if
    end de|eteVideoP|ayer

    Neil Roger - June 2, 2014 reply

    Hi Dennis,

    I’m glad I put in the comment about the extension having a few quirks 🙂

    It really depends on the complexity, size and quality of the image. The one that I posted to tech support come out correct but a few characters are wrong-

    on createVideoP|ayer
    mobi|eContro|Create “player”
    put the result into sP|ayer|D
    mobi|eContro|Set sP|ayer|D, “rect”, the rect ofimage “offer”
    mobi|eContro|Set sPlayer|D, “visib|e”, “true”
    |StPlaer|D “visib|e”true
    mobi|eContro|Set sPlayer|D, “showContro||er”, “true”
    end createVideoP|ayer

    on de|eteVideoP|ayer
    if the environment is “mobile” then
    mobi|eContro|De|ete sP|ayer|D
    end if
    end de|eteVideoP|ayer

    With that being said, the more it is used, the better it will become 🙂

  • Hermann - June 6, 2014 reply

    Such a “project” could be (or should be?) named “backstep”.

    In the dawn of the current century there were some companies who published their phone numbers as hardly readable gifs, trying to keep out all bots, for a while.
    Soon we had better solutions (for example by javaScript).

    The one and only purpose of this “project” of rather primitive OCR is that G tries to keep other bots out, for a while.
    The good thing is that it may soon produce better solutions (for example increase the market share of DuckDuckGo).

  • MaxV - June 19, 2014 reply

    I use this stack to share conde on web pages and forums: https://www.dropbox.com/s/a8ow1xk1ilulnmv/CodeSharer.livecode

    In my humble opinion is easier and better to me!

Leave a Reply Cancel

*