Code Monkey home page Code Monkey logo

Comments (4)

kleisauke avatar kleisauke commented on June 16, 2024

Specifically for ImageMagick, I believe it's best to utilize a policy.xml configuration file. For example, we use this one on our public service:

<policymap>
  <policy domain="Undefined" rights="none"/>
  <!--
  Use IM only to read certain image types. Assumes the rest is handled in libvips.
  Note: ICO data can be either a BMP image, or a complete PNG image.
  -->
  <policy domain="delegate" rights="none" pattern="*" />
  <policy domain="filter" rights="none" pattern="*" />
  <policy domain="coder" rights="none" pattern="*" />
  <policy domain="coder" rights="read" pattern="{ICO,BMP,PNG}" />
</policymap>

However, according to https://stackoverflow.com/a/50837362, GraphicsMagick does not have a direct counterpart to this functionality, but I'm not sure if that's a issue there.

from libvips.

jcupitt avatar jcupitt commented on June 16, 2024

I think you're right in a server context.

I was running into this issue with desktop libvips -- an AVI file in a directory is enough to kill vipsdisp :( But desktop users probably don't want to disable all AVI handling in imagemagick, just within libvips (where it's mostly useless).

from libvips.

kleisauke avatar kleisauke commented on June 16, 2024

Ah, you are right. It would indeed make more sense to block slow formats from the *_header() phase. Users who still want to process these files may use vips_magickload() directly, for example:

$ vips magickload x.avi x.jpg

from libvips.

jcupitt avatar jcupitt commented on June 16, 2024

I think we're done, I'll close.

from libvips.

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.