DBFILESThumbnailArg

Objective-C

@interface DBFILESThumbnailArg : NSObject <DBSerializable, NSCopying>

Swift

class 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.

Instance fields

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

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) 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 (nonatomic, readonly) DBFILESThumbnailFormat *_Nonnull format;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var mode: DBFILESThumbnailMode { get }

Constructors

  • 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.