Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
Convierta .HEIC/.HEIC a .jpeg y luego convierta el jpeg a base64 usando ionic/angular

Actualmente estoy usando ionic 5 y cordova.

Uso https://ionicframework.com/docs/native/camera para acceder a mi galería de fotos en el dispositivo iOS.

OBJETIVO: iOS predeterminado captura la imagen de tipo .heic Quiero convertir la imagen seleccionada a .jpeg y luego ese .jpeg debe convertirse a base64

estas son mis opciones de cámara:

 const options: CameraOptions = { quality: 50, sourceType: this.camera.PictureSourceType.PHOTOLIBRARY, destinationType: this.camera.DestinationType.FILE_URI, encodingType: this.camera.EncodingType.JPEG, mediaType: this.camera.MediaType.PICTURE }; this.camera.getPicture(options).then((dataUrl) => { console.log('imageUri : ', dataUrl); this.imageToBase64(dataUrl) .subscribe((res: Blob)=>{ const ref = this; const reader = new FileReader(); reader.readAsDataURL(res); reader.onload = ()=>{ console.log('reader',reader); ref.base64 = reader.result.toString(); }; }); console.log('imageToBase64',this.base64); }); imageToBase64(img): Observable<any>{ return this.httpClient.get(img,{responseType: 'blob'}); }

mi consola da => ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!