DBFILESThumbnailArg

@interface DBFILESThumbnailArg : NSObject <DBSerializable, NSCopying>

The ThumbnailArg struct.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

  • The path to the image file you want to thumbnail.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull path;

    Swift

    var path: String { get }
  • The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESThumbnailFormat *_Nonnull format;

    Swift

    var format: DBFILESThumbnailFormat { get }
  • The size for the thumbnail image.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESThumbnailSize *_Nonnull size;

    Swift

    var size: DBFILESThumbnailSize { get }
  • How to resize and crop the image to achieve the desired size.

    Declaration

    Objective-C

    @property (readonly, nonatomic) DBFILESThumbnailMode *_Nonnull mode;

    Swift

    var mode: DBFILESThumbnailMode { get }
  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull NSString *)path
                                  format:(nullable DBFILESThumbnailFormat *)format
                                    size:(nullable DBFILESThumbnailSize *)size
                                    mode:(nullable DBFILESThumbnailMode *)mode;

    Swift

    init(path: String, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?)

    Parameters

    path

    The path to the image file you want to thumbnail.

    format

    The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.

    size

    The size for the thumbnail image.

    mode

    How to resize and crop the image to achieve the desired size.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPath:(nonnull NSString *)path;

    Swift

    init(path: String)

    Parameters

    path

    The path to the image file you want to thumbnail.

    Return Value

    An initialized instance.