Main Content

initialize

Class: matlab.net.http.io.ImageConsumer
Package: matlab.net.http.io

Prepare ImageConsumer for new image in HTTP message

Syntax

OK = initialize(consumer)

Description

OK = initialize(consumer) initializes this ImageConsumer for receipt of a new image. This method is an overridden method of initialize in ContentConsumer.

Input Arguments

expand all

Content consumer, specified as a matlab.net.http.io.ImageConsumer object.

Output Arguments

expand all

Indicate whether consumer accepts or rejects message payload, returned as true or false. initialize returns false if one of the following occurs:

  • A Content-Type header field is present and its Type is not "image".

  • The Format property is empty and the subtype is not one of those that the imread function accepts as a file extension.

Attributes

Accessprotected
Introduced in R2018a