Get list of formats contained in C_PICTURE

A picture field or variable can store different image formats – and even one image in several formats at the same time. As example, an image could be stored as PNG, SVG and MacPICT – in the same variable.

The new GET PICTURE FORMATS command permits you to get the number and types of format that are contained in a C_PICTURE variable.

If you copy/paste a picture from another application, like Adobe Photoshop™ or Microsoft Word™, the other application will insert in the clipboard the image in several formats. Usually the internal native format and one or several standard formats. Pasting that into a 4D picture object, 4D does not know which format you prefer – so it stores ALL supported formats in the same object.

Later, when you export the picture or use CONVERT PICTURE, it checks if the requested format is already existing, then it will be used as it is, or it converts it. For displaying the image, 4D automatically selects one of the supported formats.

With this new GET PICTURE FORMATS command you will be able to identify such pictures and convert them into a single format, to reduce the space taken by your database. It also allows you to check if your database contains pictures saved in a deprecated format such as “pict”. If the deprecated format is supported you will be able to convert the pictures to another format (png, jpg, svg…), if not you can plan actions to recover/replace these pictures.

To know more about the new command, download the following example:

Example database

For more details, please refer to the GET PICTURE FORMATS command documentation.

Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.