Picture editor

Invoking the Picture editor card

Here are the invocation attributes you use to invoke the Picture editor card:

Attribute Value
Target ID

sys.pictureeditor.cardeditor

Action

bb.action.EDIT

URI file:///path/to/content.jpg

Configuring the size of the output image

Parameters Value Example
size

WIDTHxHEIGHT

800x600
upScale

true or false

QString upScale= "false";

You can configure the size of the output image by using the size and the upScale parameters. The size parameter allows you to specify the dimensions of the output image in pixels while the upScale parameter identifies whether the output image is scaled to that specified size or not. The upScale parameter is only valid if you first define a size for your output image. In addition, true is the default value for the upScale parameter.

Depending on how you use these two parameters, you will have one of the three outcomes mentioned below.

Output image size not specified

In this case, size and upScale parameters are not used. This allows the user to crop the image to any size or aspect ratio. On opening, the Picture editor's filter tab opens by default for this case. This use case is demonstrated in the Pictures app of the BlackBerry 10 OS.

Specifying an exact output image size

To specify an exact size for the output image, you must specify a value for the size parameter and set the upScale parameter to true. The value for the upScale parameter can also be omitted since true is the default value.

In this case, the size of the output image is exactly the same as specified by the size parameter. On opening, the Picture editor's transform tab opens by default for this case. The output image is cropped to the same aspect ratio as the size. This also means that the user will not be able to change the aspect ratio of the output image as the buttons to change the aspect ratios are disabled in the Picture editor.

When saving the output image, if the size of the edited image is different from the specified size, the output image is automatically scaled to the specified size. This use case is demonstrated in the Contacts app of the BlackBerry 10 OS.

Specifying a maximum limit for the output image size

To specify a maximum limit for the size of the output image, you must specify a value for the size parameter and set the upScale parameter to false.

In this case, the size of the output image can be smaller but never exceed the size specified in the size parameter. On opening, the Picture editor's transform tab opens by default for this case. The output image is cropped to the same aspect ratio as the size. This also means that the user will not be able to change the aspect ratio of the output image as the buttons to change the aspect ratios are disabled in the Picture editor.

When saving the output image, if the size of the edited image is larger than the size parameter specification, it is automatically downscaled to the specified size. However, if the size of the edited image is smaller than the size parameter specification, the output image size remains the same. This use case is demonstrated in the BBM app of the BlackBerry 10 OS.

Last modified: 2014-03-10



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus