Skip to content

Error: Invalid File Type #10

Open
Open
@ngothikieuvuong

Description

@ngothikieuvuong

Hi,
I have an issue when using getColors, it log error: "Error: Invalid File Type"
I am writing the automation scripts in synchronous style with Chimp.
My scripts is as below:

var buffer = fs.readFileSync(path.join(__dirname, '/../../resources/uploadData/', '1.png'));
getColors(buffer, function(error, colors){
    if (err) throw err; // it doesn't log error
    console.log(buffer); // Log: <Buffer 89 50 4e 47 0d 0a ....>
    console.log(error); // Log "Error: Invalid File Type"
});

Please help me where I am wrong? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions