This project outline is not like the artificial tidy problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project, and research the information yourself to solve them.
Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.
Though I am a programmer, I don’t do people’s homework for them. That just robs them of an education.
You have my full permission to implement this project in any way you please and to keep all the profits from your endeavor.
This is one of the amanuensis projects. Write a HTML image amanuensis. You select an image from disk using the standard file select dialog. It displays the image and pushes the corresponding HTML image string e.g.
to the clipboard so you can paste it into your html with a text editor. A fancy version might also let you select images from the web by giving a url, or capture them directly from the screen display. It might give you the ability to crop, set the transparent colour and resize by powers of two. It would act like a miniature JASC Paint Shop Pro. See the related HTML Tidier project. Some of the code you write for this project could be reused for the HTML Splitter project.I discovered that my text editor SlickEdit has this feature built-in. You just click the image icon then select and image file to import. You can override all the IMG parameters by clicking checkboxes. It has a number of minor bugs, but you might have a look at it to get an idea of what I am talking about.
This project looks harder than it really is. You don’t have to write code to unpack the compressed *.png, *.gif or *.jpg images because getImage() does that for you. It will extract the width and height.
However that is slow. I have written ImageInfo, part of the common utilities download for JDK 1.1 to extract that info for png, gif and jpg files. I have also implemented a Image macro, that does this in batch. with the advantage it adjusts the widths and heights if the images later change.
You can cannibalise code from the ISBN Amanuensis to handle pushing the results to the clipboard.
One useful batch utility you could write would check all the image files in a given directory tree and report on any that where not the format claimed, and report on what format they really are. Paint Shop Pro tries to trick you, and often succeeds, into saving a *.gif image format into a *.png file extension.
| You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | |
| http://mindprod.com/project/imageamanuensis.html | J:\mindprod\project\imageamanuensis.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.191.100] | |
| Feedback | You are visitor number 4,364. | |