0
A
回答
1
Use the Ionic Native Camera function
有一個質量選項範圍從0-100。它會返回一個壓縮的圖像
const options: CameraOptions = {
quality: 50, // Try changing this
destinationType: this.camera.DestinationType.DATA_URL,
encodingType: this.camera.EncodingType.JPEG,
mediaType: this.camera.MediaType.PICTURE
}
this.camera.getPicture(options).then((imageData) => {
let base64Image = 'data:image/jpeg;base64,' + imageData;
}, (err) => {
// Handle error
});
相關問題
- 1. 如何在j2me中壓縮圖像
- 2. 如何在iphone中壓縮圖像?
- 3. 如何在iOS中壓縮圖像?
- 4. 如何在unix中壓縮bmp圖像
- 5. 如何查找離子壓縮文件的未壓縮大小
- 6. 在android中壓縮圖像
- 7. 如何在pySpark中分離後壓縮
- 8. 在opencv上壓縮圖像(imwrite)。如何明確設置壓縮因子?
- 9. Android - 如何壓縮或縮小圖像?
- 10. 離子2緩存圖像
- 11. 如何在Linux上壓縮圖像?
- 12. 如何在Windows Phone上壓縮圖像
- 13. Java LZW壓縮和解壓縮圖像
- 14. 解壓縮PVRTC壓縮圖像格式?
- 15. LZ4:壓縮的壓縮圖像格式
- 16. 未壓縮前端壓縮圖像
- 17. 在日冕中壓縮位圖圖像
- 18. 從流中壓縮圖像
- 19. PHP中的圖像壓縮?
- 20. 壓縮圖像asp.net
- 21. .NET圖像壓縮
- 22. Matlab,圖像壓縮
- 23. VB.NET - 圖像壓縮
- 24. 壓縮圖像android
- 25. JPEG圖像壓縮
- 26. Java圖像壓縮
- 27. node.js圖像壓縮
- 28. 離子2 scss文件中的圖像
- 29. 如何僅使用PHP壓縮尚未壓縮的圖像?
- 30. 如何在離子滾動內縮放圖像
對我來說好像離子無視任何質量我將它傳遞......這樣做對你的工作? – ewizard