Feature #3: Dimension
- State: open
- Milestone: Milestone 1: Tutorial
- Labels: export, tutorial
- Assignees: None
- Created: 2022-06-02T12:13:23Z
- Updated: 2025-06-18T15:20:09Z
- URL: https://github.com/Estia-1a/projetGenieInfo_template/issues/3
Description
Feature description
Print the dimension of the input image in the output terminal.
A possible prototype:
void dimension (char *source_path);| Parameters | value |
|---|---|
| name | dimension |
| Command | -c dimension |
| Input | an image |
| output | dimension: width, height |
Usage
freud.exe -f ./images/input/image.jpeg -c dimensionOutput
dimension: 1488, 1488
Describe tips for implementing the feature Define dimension in src/features.h. Implement dimension in src/features.c. Use the data from the function read_image_data from <estia-image.h>.
int read_image_data(const char *filename, unsigned char **data, int *width, int *height, int *channel_count);The width is stored in width and the height is stored in height. Read the wiki Call dimension in src/main.c. See the helloworld example to correctly call the function.
if ( strncmp( configuration.command, "dimension", 9 ) == 0 ) {
/* dimension() function is defined in feature.h and implemented in feature.c */
dimension( configuration.filenames[0] );
}Possible Variation
Space are permitted between the dimension: and the actual value. Space are permitted around the ,