import Image from '../image';
import {RGB} from '../model/model';

export default function rgba8() {

    let newImage = Image.createFrom(this, {
        bitDepth: 8,
        colorModel: 'RGBA'
    });

    newImage.data = this.getRGBAData();

    return newImage;
}

import Image from '../image';
import {RGB} from '../model/model';

export default function rgba8() {

    let newImage = new Image(this.width, this.height, {
        kind:'RGBA'
    });

    newImage.data = this.getRGBAData();
    return newImage;
}

Update rgba8 to create a correct image