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.
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.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| 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 | ||