Skip to content

Can't inject modified exif data width and height in a memory image #41

@houssam15

Description

@houssam15
      final originalExif = await Exif.fromPath(widget.file.path);
      dynamic originMetaDataAttributes = await originalExif.getAttributes();
      originMetaDataAttributes['PixelXDimension'] = controller.croppedImage?.width;
      originMetaDataAttributes['PixelYDimension'] = controller.croppedImage?.height;

      final tempPath = '${directory.path}/${DateTime.now().millisecondsSinceEpoch.toString()}_edited.${widget.extension}';
      await File(tempPath).writeAsBytes(imageBytes);
      final exif = await Exif.fromPath(tempPath);
      await exif.writeAttributes(originMetaDataAttributes);

error :

flutter: PlatformException(SRC_ERROR, Error while getting source type, null, null)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions