Coder Social home page Coder Social logo

vs-imwri's Introduction

vs-imwri's People

Contributors

djatom avatar holywu avatar myrsloik avatar yomikor avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

vs-imwri's Issues

Fails with long network paths on Windows

I was testing this library out and it fails to write (just hangs) with very long Windows path names. Example path name that was failing.

\\JLW-UNRAID\dl_share\downloads_nvme_temp\random_folder\downloads\Hostage.2005.Remastered.BluRay.1080p.DTS-HD.MA.5.1.AVC.HYBRID.REMUX-FraMeSToR\Hostage.2005.Remastered.BluRay.1080p.DTS-HD.MA.5.1.AVC.HYBRID.REMUX-FraMeSToRä_temp\Hostage.2005.BluRay.720p.DD.2.0.x264-group_images\img_comparison\%da_source__%d.png

Edit if I create a small function to convert this to a UNC path it works fine.

def convert_to_extended_path(path: str) -> str:
    """
    Convert a standard or UNC path to an extended-length path
    with the \\?\ prefix for Windows if needed.

    Parameters:
    - path (str): The original file path.

    Returns:
    - str: The extended-length file path if needed, or the original path.
    """
    # Ensure we're manipulating a string
    path = str(path)
    
    # Normalize slashes to backslashes
    path = path.replace('/', '\\')    

    # Check if the path is already an extended path
    if path.startswith("\\\\?\\"):
        return path

    # Check if the path length exceeds 260 characters
    if len(path) > 260 or any(ord(char) > 127 for char in path):
        # Check if the path is a UNC path (starts with \\)
        if path.startswith("\\\\"):
            extended_path = "\\\\?\\UNC" + path[1:]
        else:
            extended_path = "\\\\?\\" + path
        return extended_path

    return path

Is this intended?

CI fails

This is probably a quick job for @HolyWu since I don't keep up with CI things much

Crash on filter free

Steps to reproduce:
Windows 10/11, VS R57, with the latest CI artifact of imwri.
Restart Windows, as it won't appear since the second attempt.
In VSEditor, preview the following script, then close the preview window. There will be a seg fault.

import vapoursynth as vs
vs.core.imwri.Read('unknown.png').set_output()

doc - add build instructions (Linux)

It would be neat to have build instructions for this plugin on linux, especially the part around ImageMagick can get tricky.

It may help others to have some instructions / dependencies required for building (e.g. meson, ninja, libpng(or others)) , what do you think?

I am happy to make a PR with a file such as BUILDING.md , if you guys are ok with it.

Here is how I am doing it for Linux (inside Docker): https://github.com/ckcr4lyf/vapoursynth-build/blob/b2d3e809d9eafd8d513cc8090854d4fda35cc767/Dockerfile#L47

pip warning about versioning deprecation

DEPRECATION: imagemagick-writer Reader-IMWRI has a non-standard version number. pip 24.1 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of imagemagick-writer or contact the author to suggest that they release a version with a conforming version number. Discussion can be found at pypa/pip#12063

pip 24.1 milestone is due by august 2024.

Crash with float_output=True

Python 3.8, Windows 10, dll from release R1

>>> import vapoursynth as vs
>>> core = vs.core
>>> core.std.LoadPlugin('libimwri.dll')
>>> clip = core.imwri.Read('Unknown.png', float_output=True)
>>> clip.format.name
'RGBS'
>>> frame = clip.get_frame(0)
Filter Read returned a frame that's not of the declared format
VapourSynth encountered a fatal error: Filter Read returned a frame that's not of the declared format

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.