Jump to content

Base64 Image Encoder


erifash
 Share

Recommended Posts

This will encode an image into base64 embedding it into an html file, making it displayable in a Mozilla browser (ex, Firefox). This is really useful because you can have pictures on your website without uploading images. Everything can be contained in a single html or php file (have functions to display different images based on the $_REQUEST array)! Base64.exe needs to be in the same directory as the script. I hope that's enough of an explanation. The zip file is attached. ;)

base64.zip

<span style='color:red'>EDIT: Thanks to blindwig for his link to the base64 converter!</span>

<span style='color:red'>EDIT2: Updated. Now accepts most image types.</span>

Edited by erifash
Link to comment
Share on other sites

You are welcome.

I have figured out why certain images weren't being displayed: they were too big. Base64 image encoding should only be used for small images (not digital photos). I have updated the program accordingly.

Edited by erifash
Link to comment
Share on other sites

they were too big. Base64 image encoding should only be used for small images

??? Base64 encoding is simply an encoding mechanism - there is NO inherent limitation based on filesize. If it is indeed true that the attached util chokes on big files, then it is a limitation / bug in the tool, not a limitation of the base64 specification.

In addition, there is no limitation on filetype - base64 can be used on any type of information - most commonly, it is used to encode binary email attachments, (to get around old SMTP implementation limitations), as well as a

basic obfuscator in plaintext SMTP AUTH mechanisms.

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

The encoding mechanism doesn't choke, what I am meaning by "It doesn't work for larger pictures" is that when I load the large encoded picture into Portable Firefox it is loading and I see the picture but then it's gone. I don't know why that happens but if I had to guess I would say that Firefox chokes on the large picture. Sorry I didn't clarify that more. ;)

P.S.: I love the new layout to the forums.

Edited by erifash
Link to comment
Share on other sites

  • 2 weeks later...

I actually zip up a file, base64 it, (modify the alphabet ever so slightly in it ;) ), and send up from my computer to a script on line that stores it in a serialized array, replacing the old, or adding new - which in turn a user can get files from through a compiled script on their computer which does the opposite of the original .... point is, my little ball of files on line as I call it is around 50 megs in size, with thousands of files in it - some of them up to 5 megs, most 1k or < - covering a range of files from compiled c, visual basic, autoit, zend compiled php, non compiled test files, audio, jpgs, gifs, pngs, icos, basically you name it .. -

never once have had a problem with file size

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...