Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Expressing Images in a different way

  • 31-12-2004 9:32pm
    #1
    Registered Users, Registered Users 2 Posts: 3,977 ✭✭✭


    Is there any use for/advantage to storing image information in text format?


Comments

  • Registered Users, Registered Users 2 Posts: 307 ✭✭Thordon


    Text is just a sequence of bytes decoded as ASCII, theres nothing special about it, in the end everything is stored as bits/bytes. You could read any image as text if you wanted, it would just be gibberish. So to answer your question, no.


  • Registered Users, Registered Users 2 Posts: 3,977 ✭✭✭mp3guy


    i mean express it like, pixel 123,123 is blue, etc for every pixel


  • Closed Accounts Posts: 7,488 ✭✭✭SantaHoe


    As far as my understanding of image encoding goes, the bitmap format is just that... although not stored in plain english, they do make reference to a sort of grid... that pixel x123 y123 is | Red: 055 | Green: 097 | Blue: 001
    Which is why any bitmap of a specified set of dimenstions and colour depth will always use the same amount of memory regardless of the actual image. (afaik anyway)
    The obvious downside of this method is a large filesize... imagine what kind of file sizes you'd be running if you actually had an image saved where it actually had the plain english: "Pixel 1,1 is red: 40, green: 30, blue: 255" for every pixel in the picture... or are you not talking literally?


  • Registered Users, Registered Users 2 Posts: 307 ✭✭Thordon


    Each character in a text file takes up one byte of space. a byte is a number from 0 to 255.

    3 bytes are used for the 3 component colors of light, red, green and blue, also 1 byte is used for alpha (doesnt matter), so thats 4 bytes per pixel, or 32 bit, if you were to store the number 125 as text (for example), that would be 3 bytes for just 1 color, you would also need to seperate is somehow, like a comma, that would be another byte, so for 3 colors, your talking 12 bytes per pixel, much less efficient storage.

    This is all uncompressed anyway, compression drastically reduces filesizes, gif, jpeg, png, theyre all heavily compressed. You wont usually see uncompressed images used for anything.


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,857 Mod ✭✭✭✭Capt'n Midnight


    mp3guy wrote:
    Is there any use for/advantage to storing image information in text format?
    No.
    only possible advantage would be human readable - but we are much better at processing visual data than computers.

    Bitmaps contain a header with the number of colours, height and width of the image. The rest is just the colours of each successive pixel , no positional info since then Nth number is the Nth pixel. depending on the colour depth the number could be a single bit or up to three bytes long.
    Other data formats use compression - eg: RLE bitmaps only record when the colour changes, others use sneakier compression and for mpeg there are no compression rules, just decompression ones so everyone can view the same pictures but still sell and patent different ways of generating them.


  • Advertisement
Advertisement