Image Amanuensis Image Amanuensis
home Student Projects no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. It does not describe an actual complete program. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; I have too many other projects of my own.

I do contract work for a living, which could include writing a program such as this. However, 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 any way you please.

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.


CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 2,800. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/project/imageamanuensis.html J:\mindprod\project\imageamanuensis.html