Java Reference
In-Depth Information
cameraControl.setExposureMode("landscape");
flashControl.setMode(FlashControl.OFF);
zoomControl.setDigitalZoom(350);
...
snapshotControl.setFileSuffix(".jpg");
snapshotControl.setFilePrefix("aerith");
imageFormatControl.setFormat("image/jpeg");
imageFormatControl.setParameter(FormatControl.PARAM_VERSION_TYPE, "JPEG");
imageFormatControl.setParameter(FormatControl.PARAM_QUALITY, 80);
...
snapshotControl.start(1);
Before we upload the picture using JSR-172, we can also apply some
nice image effects using the image-processing capabilities of JSR-234
AMMS, such as effects and transformations. For example, we could
convert the image to monochrome:
// get media processor for jpeg format
MediaProcessor processor =
GlobalManager.createMediaProcessor("image/jpeg");
// get processor controls
ImageEffectControl imageEffectCtrl = (ImageEffectControl)
processor.getControl
("javax.microedition.amms.control.imageeffect.ImageEffectControl");
...
// set the new preset to convert the image to monochrome image
imageEffect.setPreset("monochrome");
imageEffect.setEnabled(true);
...
// Wait until the processing has been completed
processor.complete();
With these features implemented, we would probably include the
option to beam pictures to our friends from the locally-cached album,
using JSR-82 Bluetooth. We'd also internationalize our revamped Mobile-
Aerith with JSR-238 Internationalization.
We could add even more: JSR-75 FileConnection to cache the images;
JSR-205 WMA to send SMS to our friends once we take the picture;
registration in the Push Registry to be activated when a similar message
from a friend is received. But it looks like we have already achieved an
significant improvement, so let's put the all the new pieces together and
see what we have now.
The original MobileAerith (before MSA), as shown in Figure 6.4, uses
JSR-226 SVG to provide a great UI and JSR-135 MMAPI to take snapshots.
We added JSR-172 for uploading and downloading pictures from the
account, after having signed in using JSR-177 SATSA, got our current
location using JSR-179 Location and used that information and JSR-172
again to retrieve a map from a geo site. Advanced camera operation,
Search WWH ::




Custom Search