xyxiao001 / vue-cropper

A simple picture clipping plugin for vue
https://github.xyxiao.cn/vue-cropper/docs/vue3.html
MIT License
4.3k stars 695 forks source link

outputType #191

Closed IEfucker closed 5 years ago

IEfucker commented 5 years ago

设定outputType失效,发现这行代码, https://github.com/xyxiao001/vue-cropper/blob/master/src/vue-cropper.vue#L1567

callback(new Blob([arr], { type: that.type || "image/png" }));

这里的type是不是写错了

xyxiao001 commented 5 years ago

没有啊 你设置什么没成功

IEfucker commented 5 years ago

jpg 我在外面调用了getCropBlob,得到的blob的type是'image/png'

xyxiao001 commented 5 years ago

jpg 需要设置为jpeg

IEfucker commented 5 years ago

哦看文档不仔细 我看这个问题最后的回复,截图输出是不是也要考虑下原图片是什么格式 https://github.com/xyxiao001/vue-cropper/issues/110#issuecomment-384928986

我看有效值有jpeg || png || webp 请问原图片bmp,gif怎么设定

xyxiao001 commented 5 years ago

canvas只支持这三种输出

xyxiao001 commented 5 years ago

应该是可以的