Coder Social home page Coder Social logo

Comments (6)

Sheepux avatar Sheepux commented on July 23, 2024 1

You could create a file format collection as a chapter sheep-scan for unit testing
https://github.com/manga-download/sample-websites/tree/main/sheep-scanlations

from haruneko.

ronny1982 avatar ronny1982 commented on July 23, 2024 1

I see, so file extensions are not yet implemented...
Added a provisional patch in 41e76a1

from haruneko.

ronny1982 avatar ronny1982 commented on July 23, 2024

Are you sure they were stored as jpeg and not as octet-stream?
May need to improve the jpeg detection to not falsely detect avif as jpeg

from haruneko.

MikeZeDev avatar MikeZeDev commented on July 23, 2024

Idk what you mean by stored. Frontend preview show the type as octet-stream, but they are displayed accurately.

I said that when user ask to download then file are saved with .jpg extension, no matter what their content or mime type is.

May need to improve the jpeg detection to not falsely detect avif as jpeg

Afaik for now we force jpg extension on file names.


 private async StoreImageFolder ....

  const sc = this.Parent?.Parent['storageController'] as StorageController;
            const data = await sc.LoadTemporary<Blob>(resources.get(index));
            // TODO: determine file extension based on mime type
            const extension = '.jpg';
            const name = (index + 1).toString().padStart(digits, '0') + extension;
            const file = await directory.getFileHandle(name, { create: true });
            const stream = await file.createWritable();
            await stream.write(data);
            await stream.close();


My PR only make sure we got the good mime type. The actual "put the good extension on the file" is still to be done.

Moreover, there is this Common.ImageDirect (detect) flag to consider.

from haruneko.

MikeZeDev avatar MikeZeDev commented on July 23, 2024

Added a test manga with avif file : Rabbit's Bizarre Adventures

from haruneko.

MikeZeDev avatar MikeZeDev commented on July 23, 2024

I guess it can be closed for now

from haruneko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.