Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can this be done?

 
Greg Kearn
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Open an existing jpg file and make annotation "on top" and save the positions of the annotations so when someone opened the file they would see the notes? For example a small jpg blueprint, someone marked up with notes but not disturb the original. When another user opens the file with notes they appear in the correct positions.
If the above is not possible, would it be possible to edit an existing jpg file and save it?
Thanks for the time,
Greg
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This isn't really a J2ME specific question is it?
A jpg file is just a compressed file that contains a bunch of pixels with color values. There is no concept of layering.
You can write a java program to display the jpg in one layer, and then create your annotations as graphic objects in a higher-layer;
To save these annotations, you have two choices.
You can merge the output of the jpg and annotations by drawing all of them into the same Graphics, then save the merged image as a single jpg. When you do this, the annotations will be part of the image, and you cannot "remove" them.
Or, you can create your own custom file format that contains the original jpg, and seperate images for the annotations, and data about where they should be displayed in relation to the main jpg. This is a lot more work, but will allow you to show and hide the annotations and not affect the original image.
Good luck!
Rob
 
Greg Kearn
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob thanks for the overview. Does J2ME have the ability to accomplish this task? Or do you have to get to the PersonalJava edition to complete it?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic