View Full Version : Programming ideas... Again.

03-09-2008, 05:58 PM
Hey there. I'm stuck again between wanting to code and not knowing what to code. I'd love some suggestions of projects that would be interesting and that wouldn't involve too much GUI stuff. I don't really mind reinventing the wheel, I'm not too much into game programming and I think I have decent knowledge of C/C++. That sums up pretty much what I am as a coder. I think my biggest problem in programming is my code design which is most of the time naive and flawed so I'm looking forward to make many smaller applications and then bigger ones. I'm lacking ideas though.

Thanks =)

Mario F.
03-09-2008, 08:19 PM
Well, something I'm interested in - and will eventually get to it - is a small and simple library that offers to read and write to several image formats textual metadata. The idea is to provide a class that can be used by screen readers authors to describe an image in the screen, and by image authors to easily insert that information into the image. You could start with PNG.

03-09-2008, 10:12 PM
What are some other classes you are taking? I'd find something tedious you find yourself doing frequently in homework for other classes, such as computing properties of simple geometric shapes based on their dimensions, or interpolating between values in a table, and write a program that does those things for you.

03-09-2008, 10:32 PM
I am not taking any class. I'm self-taught.

Edit: Note that I am not really interested in the kind of tasks they give in universities as I've seen them (and done them) quite often because of users posting their homeworks.

Also, I find the metadata library interesting. I looked at the structure of a PNG file and found all kinds of stuff but nothing that would allow me to write the file myself. For example, it is stated that each chunk must be followed by the size of the data, a CRC and then the data. However, it is not stated anywhere how to actually arrange the data in the file. I think the use of openpng is enforced but if I have to use a different library for each file extension it's going to be a total mess. I'd rather learn the structure of each one and implement the code myself.

Mario F.
03-10-2008, 05:12 AM
Note that I only scratched the surface for this. Something I got a desire to do based on the fact I have a blind friend. But am yet to actually dive deep into it.

However, for the PNG format you have two ancillary chunks which seem meaningful. iTXt, which stores textual data in UTF-8 format, seems a good candidate for a description tag. tEXt is a western latin name=value pair per chunk which can be used for instructions to the screen reader or image cataloging purposes. You can create as many of each as you want. Although I suspect only one iTXt is needed.

Another interesting ancillary chunk is the hIST which contains the image histogram. Blind people often have a desire to know the "color of the image". I guess some sort of parser would be needed here if you wanted to take the extra step of giving them that kind of information.

03-10-2008, 09:14 AM
I thought that the iTXt and tEXt tags would be useful, too, but I don't know how they are stored in a file =/

I'll try to find some info on it but I work full-time so that's going to slow me down quite a lot =P

Mario F.
03-10-2008, 09:32 AM
You'll find plenty of info, i'm sure on the PNG specification site. It was just an idea, mind you. Since I wanted to do this sooner or later, remembered to share with you.

Metadata information usually goes in the top of the file and is in byte format. It is also usually clearly delimited by some form of markup. I only skimmed through the PNG specification in order to answer your previous question, but there was information there on the markup.

I just don't have time to delve into it at the present time. So, if you like the idea and wish to do it, good luck.

... and let me know if you finished it ;)

03-10-2008, 11:08 AM
I think I have found out how the structure is laid out. I will see if I can do something about it as soon as I have time.