Reduce numbers to one number



Hello -

I am developing an online and downloadable utility to enable any image
to be expressed ultimately as a single number and or a character.

At the present stage by right-clicking on any image on the web, the
utility stores the pixel values in the image from left-to right and top
to bottom as characters or numbers (based upon converting the image to
256 colours if necessary).

An image of 500 x 375 pixels appears at www.amw1.com - there are
187,500 pixels which results in 187,500 numbers or characters.

The file size of the jpg image is 145 kb but the resulting text file
containing the 187,500 text characters is 187kb which can be zipped
down to under 1kb. So far so good. However, I want to go further and
reduce the text file even more.

One way of reducing the 184,500 numbers and characters is to apply a
calculaton that the utility will make so as to reduce the numbers to
far fewer numbers/characters.

These few remaining numbers or characters can then be saved as a text
file which will be no more than a few bytes in file size (one text
character = 1 byte).

When the recipient receives the text file (which may be no larger then
1kb) then the same utility will reproduce the image from the numbers or
characters appearing in the text file.

Can anyone guide me on the type of calculation that my utility will
have to make in order to reduce the characters or numbers in the text
file?

The best formula or method will be incorporated in the utility with
credit given to the author.


John Aidiniantz
www.amw1.com

.



Relevant Pages

  • Tk canvas: why are some lines a pixel too short?
    ... My Tk application draws its own characters, ... to have one few pixel fewer lit up on the two right-hand ends compared ... the supposedly symmetrical pattern has a distinctly flat ...
    (comp.lang.tcl)
  • Re: Screen Size
    ... So I presume you mean that you used the conversion obtained from Point to Pixels to set up the size of your font in the LOGFONT structure that you used with CreateFontIndirect API and then just happened to draw that text to the screen DC using DrawText. ... If that is the case then you've probably used the pixel value directly when using CreateFontIndirect, ... When you use a negative value for the pixel size in the lfHeight entry in the LOGFONT structure then you are effectively asking Windows to select a font size such that the height of the "glyph" (the part of the character cell actually occupied by the shape of the characters) is the requested pixel height. ...
    (microsoft.public.vb.general.discussion)
  • Re: Setting the column width size to n number of characters
    ... size in pixel. ... number of characters. ... for some possible choices of font. ... Roedy Green Canadian Mind Products ...
    (comp.lang.java.gui)
  • Re: Rasterizing text (simple html for example) to low resosultion grahics
    ... small buffers for all the characters you want to be able to display. ... you output a pixel on screen of the desired color. ... also come in handy if you want to add scroll capabilities but don't ...
    (comp.lang.forth)
  • Re: mapping a pixel to a character
    ... > I would like to map each pixel to a character. ... > I have 64 characters arranged in order based on ... you have an index into a character array -- i.e. put the grey level ...
    (comp.programming)