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

335
Views
¿Cómo importo tiff.js a mi proyecto Vue?

Quiero ver el archivo .tif en mi Vue, así que trato de usar tiff.js.
Lo pruebo en un "test.html" y lo uso para importar tiff.min.js.

 <script src="./tiff.min.js"> </script>

Sin embargo, no hay exportación desde tiff.min.js, así que no sé cómo importar eso a mi vue-cli.

 <script> export default ({ name:"test", methods:{ show(file){ var reader = new FileReader(); reader.onload = (function (theFile) { return function (e) { var buffer = e.target.result; var tiff = new Tiff({buffer: buffer}); var canvas = tiff.toCanvas(); var width = tiff.width(); var height = tiff.height(); if (canvas) { $('#output').empty().append(canvas); } }; })(file); reader.readAsArrayBuffer(file); } } }) </script>

hay algo mal: "No se pudo encontrar el nombre 'Tiff'. ¿Quiso decir 'tiff'? Vetur(2570)"

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Creo que su problema se aborda en esta pregunta de StackOverflow si desea importar el archivo js en su componente Vue Importar archivo javascript para usar dentro del componente vue

o sus otras opciones podrían ser https://github.com/photopea/UTIF.js o https://github.com/image-js/tiff

about 4 years ago · Juan Pablo Isaza Report
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!