DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: NANY 2018 Release: BaseImage  (Read 30,426 times)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
NANY 2018 Release: BaseImage
« on: December 12, 2017, 04:22 AM »
NANY 2018 Entry Information

Application Name BaseImage
Version 1.0
Short Description Small utility for easily creating base64 encoded images
Supported OSes Windows 7
Web Page Online Documentation
Download Link Download Baseimage
System Requirements Only works on Windows
Version History
Author Link to Author's Profile page on Stack Exchange


Description
This is a little gui to let you create base64 encoded images. You can drag-n-drop an image onto its window and then choose to either export to file or copy to the clipboard. You can copy just the base64 code, or an html img tag, or a full html page.

Features
  • Generates base-64 encoded html img tags from a given image file
  • Easy-to use, simple interface
  • Drag-n-Drop
  • Built-in demo
  • Copy just the image tag or just the code
  • Export to html file
  • Export img tag to file
  • Autonaming
  • Use Custom HTML Template
  • Tray Icon Support

Planned Features
Nothing yet.

Screenshots
baseimagegui.png
Please visit the documentation page for more images

Usage
Installation
Just extract the zip file to a folder and run the exectuable.

Using the Application
Run baseimage.exe and select Run Demo from the Tools Menu.
Or, drag your own image onto the window and select Export html to file from the File Menu (html files normally open in your browser).  Then, in your browser, view source.

Uninstallation
Just exit the application and delete all the files.

Known Issues
No issues yet.
« Last Edit: January 09, 2018, 03:39 AM by BGM »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: BaseImage
« Reply #1 on: December 12, 2017, 04:27 AM »
Great to see another NANY 2018 entry -- keep 'em coming!

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: BaseImage
« Reply #2 on: December 31, 2017, 08:13 PM »
Hey! Anybody try this out for me?  I guess nobody is interested in something like this?  I know it's a bit specialized.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: BaseImage
« Reply #3 on: December 31, 2017, 08:23 PM »
I must admit I have never heard of base64-encoded html images -- but it looks neat.  I'm sure someone will find it useful!
Welcome to the club of writing programs and waiting a long time for your first user -- I've been there, I am there :)

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: BaseImage
« Reply #4 on: January 01, 2018, 12:16 AM »
I must admit I have never heard of base64-encoded html images -- but it looks neat.

Me, neither.  However, I did have a play with it and it works as designed.  I dragged an image, copied the img tag to a page on my website, and it worked perfectly.  Pretty cool, actually, when you think about it.  I could see using this instead of actual image files which would make it MUCH easier to move webpages that used static images.  I just might make extensive use of this when I move my current site to the new DC server.

Very cool, BGM.  Thank you for sharing.

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: BaseImage
« Reply #5 on: January 01, 2018, 12:22 AM »
Thanks for trying it out!  For webpages, bear in mind that the encoded image is *very* long.  It increases the page size but you don't have to load an external file.  The best use of this, I think, is for using html email signatures.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: BaseImage
« Reply #6 on: January 01, 2018, 12:25 AM »
For webpages, bear in mind that the encoded image is *very* long.

Yep.  I am fully aware of base64 encoding (email attachments, etc.) but never realised that they could be used in a webpage like that.  =]  Quite slick.

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: NANY 2018 Release: BaseImage
« Reply #7 on: January 09, 2018, 09:10 AM »
The main advantage is probably one less request, resulting in resource optimization.  :)
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: NANY 2018 Release: BaseImage
« Reply #8 on: January 09, 2018, 09:16 AM »
For an example of this out in the wild: The Lastpass extension uses a Base64-encoded image to inject their little asterisk symbol (or whatever their logo is these days) into form fields for their autofill stuff. :Thmbsup:

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: NANY 2018 Release: BaseImage
« Reply #9 on: January 09, 2018, 04:26 PM »
Another place it is used - is by the Firefox Custom Buttons extension for the button icons - when you select an image for the icon, it base64 encodes it so it doesn't have to refer to a file location.

fredemeister

  • Participant
  • Joined in 2013
  • *
  • Posts: 39
Re: NANY 2018 Release: BaseImage
« Reply #10 on: February 12, 2018, 10:41 PM »
Also could be used for any external link images.

I tried the program using an image 307KB jpg at 1600x1067. The resulting code was 117 lines long (word-wrapped) at fullscreen on a 19" monitor. I do a lot of archival image galleries, with about 30 images per gallery and this would generate a humungous html file. So whether the loading time difference would be significantly less is uncertain. This would be on a local machine, as the galleries are not served to a website. Also encoding time would be significantly increased. I like the idea, but perhaps image galleries are not a practical use for this program. :)

Just a comment

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: NANY 2018 Release: BaseImage
« Reply #11 on: February 12, 2018, 10:48 PM »
Yeah, I wouldn't use this procedure for an image gallery.  I've used it to store images for buttons in certain javascript applications (like InDesign Extendscript or Firefox Custom Buttons) where you don't want external files, and I use it myself for images in email signatures.  The value of this is that you can store the image inside the code - so it would be best for smallish type icons. 

However, to avoid 117-line strings, you could always disable wordwrap in your text editor!  hahahaaa

fredemeister

  • Participant
  • Joined in 2013
  • *
  • Posts: 39
Re: NANY 2018 Release: BaseImage
« Reply #12 on: February 12, 2018, 11:18 PM »
However, to avoid 117-line strings, you could always disable wordwrap in your text editor!  hahahaaa

Imaginative transfer of a vertical problem to a horizontal one. :)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: NANY 2018 Release: BaseImage
« Reply #13 on: April 16, 2018, 05:12 PM »
Any idea what this nice fellow said?

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: NANY 2018 Release: BaseImage
« Reply #14 on: April 16, 2018, 08:52 PM »
^ if you mean the previous post:

the scrolling problem (due to the '117-line strings') goes from being a vertical problem to being a horizontal one (once wordwrap turned off).

(With apologies in advance if you meant something completely different!)
Tom

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 566
    • Participated in NANY Challenge Seven Times
Re: NANY 2018 Release: BaseImage
« Reply #15 on: April 16, 2018, 08:53 PM »
tomos - thanks - no - there was a post all in Russian earlier today.  It must have been spam, and Mouser must have deleted it.

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: NANY 2018 Release: BaseImage
« Reply #16 on: April 16, 2018, 09:18 PM »
tomos - thanks - no - there was a post all in Russian earlier today.  It must have been spam, and Mouser must have deleted it.

Yes, it was spam, so I whacked it.  :D

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,970
    • Gathering Badge
    • Participated in NANY Challenge Once
Re: NANY 2018 Release: BaseImage
« Reply #17 on: April 16, 2018, 09:57 PM »
. . . and me explaining the obvious :D
Tom

CthulhuSaves

  • Participant
  • Joined in 2018
  • *
  • Posts: 1
Re: NANY 2018 Release: BaseImage
« Reply #18 on: April 20, 2018, 06:25 AM »
Hi,


New member, here. Poking around and spotted this. Just wanted to say, this is incredibly cool.

With this, who needs attachments or external image hosts? Brilliant idea. :)

Love it!

Now, if a v2 could be made that could reproduce animated GIFs, as well, that would be the icing on the cake.

Original address: https://www.donationcoder.com/forum/index.php?topic=44738.0