filereader

Convert Blob to image url and use in image src to display image

我的未来我决定 提交于 2021-01-20 15:44:49
问题 How to convert blob to base64/image? I am getting this blob through API call and I am trying to display it in a image. I have tried with stackoverflow answers but nothing could help so I just tried this. //Angular 5 code imageSrc;//global variable data = [{"image_blob":{"type":"img/jpg","data":[123,125]}}];//from api var blob1 = new Blob([new Uint8Array(data[0].image_blob.data)]); const imageUrl = URL.createObjectURL(blob1); console.log(imageUrl);//blob:http://localhost:8100/c489.etc this

Convert Blob to image url and use in image src to display image

馋奶兔 提交于 2021-01-20 15:44:08
问题 How to convert blob to base64/image? I am getting this blob through API call and I am trying to display it in a image. I have tried with stackoverflow answers but nothing could help so I just tried this. //Angular 5 code imageSrc;//global variable data = [{"image_blob":{"type":"img/jpg","data":[123,125]}}];//from api var blob1 = new Blob([new Uint8Array(data[0].image_blob.data)]); const imageUrl = URL.createObjectURL(blob1); console.log(imageUrl);//blob:http://localhost:8100/c489.etc this

Convert Blob to image url and use in image src to display image

吃可爱长大的小学妹 提交于 2021-01-20 15:43:32
问题 How to convert blob to base64/image? I am getting this blob through API call and I am trying to display it in a image. I have tried with stackoverflow answers but nothing could help so I just tried this. //Angular 5 code imageSrc;//global variable data = [{"image_blob":{"type":"img/jpg","data":[123,125]}}];//from api var blob1 = new Blob([new Uint8Array(data[0].image_blob.data)]); const imageUrl = URL.createObjectURL(blob1); console.log(imageUrl);//blob:http://localhost:8100/c489.etc this

Convert Blob to image url and use in image src to display image

耗尽温柔 提交于 2021-01-20 15:40:24
问题 How to convert blob to base64/image? I am getting this blob through API call and I am trying to display it in a image. I have tried with stackoverflow answers but nothing could help so I just tried this. //Angular 5 code imageSrc;//global variable data = [{"image_blob":{"type":"img/jpg","data":[123,125]}}];//from api var blob1 = new Blob([new Uint8Array(data[0].image_blob.data)]); const imageUrl = URL.createObjectURL(blob1); console.log(imageUrl);//blob:http://localhost:8100/c489.etc this

Is there any ways to save external file “information” into array in java?

无人久伴 提交于 2021-01-05 07:27:40
问题 e.g: (I took the first line of the external file) Giant, Colgate Toothpaste, 4.50 I want to separate & save them in an array like this before/after I send them to the object & ArrayList. mall[i] = "Giant"; product[i] = "Colgate Toothpaste"; price[i] = 4.50 p/s: I think I should do that because I need to alter the price in the future. This is how my coding looks like right now. public static void readFile(ArrayList<Product> productList) throws Exception { try { productList.clear(); //clear the