Code Monkey home page Code Monkey logo

quad-image's People

Contributors

dependabot[bot] avatar fauxfaux avatar fodt avatar williamparry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

quad-image's Issues

Make the crate a bit more reasonable

I quickly pushed the crate to reserve the name. Review:

  • metadata (e.g. categories)
  • badges
  • install instructions (e.g. RUSTFLAGS)
  • dev docs (e.g. how the built-in content host works)
  • ignores?

Strips JPEG rotation metadata

JPEG has a notoriously janky way of recording rotation. Currently, we strip it out, leading to rotated images.

Ideally, I would like to apply this rotation metadata to the image directly, and write out a file without metadata, but which looked correct.

Alternatively, we could preserve just this metadata. This would only be okay if it was correctly parsed, and re-serialised correctly from simple types (a single Option<u8>?); no copying.

Handle GIFs

The image library we're using supports the GIF format, but doesn't automatically round-trip multi-image GIFs (videos), so we currently don't bother, we transcode them to PNG, which is superior in every way for single-frame images.

If an actual multi-frame video GIF arrives, we should re-present it as a (cleaned) GIF.

Gallery clarifications

Here are a few thoughts/bugs/feature requests regarding galleries:

  • Currently, if a host deletes created image files as a way of space management (in this case the hosted version of quad-image I use has a cronjob that deletes all uploaded images occasionally) it will prevent one from creating a gallery due to some of the current images being in a weird pseudo-state. I assume this is because they have entries in the DB but no actual file, causing the /api/gallery call to fail. Missing files could maybe be gracefully handled, which would correct this.
  • The gallery UI is a bit janky. It took me a bit to understand it myself, and I still have some questions:
    • (My general use-case for galleries is when I want to have multiple photos attached to one link that I can share, similar to what Imgur allows.)
    • Whenever I "sync" a gallery, I can't seem to stop uploading to that specific gallery: that is, there doesn't seem to be a way to unset targetGallery, which is what I want to do once I've uploaded a batch of images to some gallery.
    • I have trouble understanding the interaction between the bottom strip of photos (which I imagine is a list of photos I've recently uploaded), my current gallery, and a gallery I "sync" to. It seems that all photos in that strip get added to a gallery as soon as you sync to it, which I don't usually want. Instead, I want to upload a small set of specific photos to a gallery and then share the link for it, before switching back to "one-off" uploads.
  • The trashcan-arrow button is a bit unclear in what it's intended to do. It could possibly have some title text of some sort to clarify its purpose.

Hopefully you can make something of that, and thank you for writing this lovely piece of software! :-)

Handle pastes of JPEGs

Currently, at least Chrome report pastes of JPEGs in ways that make us thing they are PNGs.

The user gets to wait ages for this to upload, then the server tries to compress it as a PNG, decides it is too big, and re-compresess it as a JPEG. What a waste.

Can we detect the paste of JPEGs?

Build on Windows?

It'd be nice to drop all the unix-specific bits. It's probably just "use path/url apis" (which is a good idea), and change the permissions code to not run.

Very slow writing to temp file in docker

Hi, this project is very cool - thanks for creating it. I recently ditched IRC Cloud for The Lounge and was looking for something to replace the image sharing feature and this fits perfectly. But I've had an issue that I haven't been able to understand or fix when running this in docker. I've tried using the rust base image, alpine, and ubuntu bionic. It gets to this line and then takes 2+ minutes to finish writing 400kb to the temp file. I was hoping you had a guess as to why. It works without this issue running outside of a docker container.

Produce thumbnails

It would be useful to return thumbnails for the current main UI, and for any gallery tool, and for any possible mobile app. Re-serving someone the image they just uploaded is a huge waste of mobile bandwidth, but a preview would be nice.

I propose generating :thumb files, e.g. /e/NCxAn3UCHg.jpg:thumb, of a fixed size and low quality.

320x160, with some low quality JPEG mode?

What about letterboxing, borders, etc.? PNG with transparent letterboxes? 320x160 noise.png is 120kB, which feels like too much.

We need a way to back-fill this for missing files. On start, walk the directory, and fill anything that's missing?

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.