imageproxy | A caching , resizing image proxy written in Go | Proxy library

 by   willnorris Go Version: v0.11.2 License: Apache-2.0

kandi X-RAY | imageproxy Summary

kandi X-RAY | imageproxy Summary

imageproxy is a Go library typically used in Networking, Proxy, Docker applications. imageproxy has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

imageproxy is a caching image proxy server written in go. It features:. Personally, I use it primarily to dynamically resize images hosted on my own site (read more in this post). But you can also enable request signing and use it as an SSL proxy for remote images, similar to atmos/camo but with additional image adjustment options. I aim to keep imageproxy compatible with the two most recent major go releases. I also keep track of the minimum go version that still works (currently go1.13 with modules enabled), but that might change at any time. You can see the go versions that are tested against in .github/workflows/tests.yml.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              imageproxy has a medium active ecosystem.
              It has 3114 star(s) with 469 fork(s). There are 66 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 58 open issues and 144 have been closed. On average issues are closed in 99 days. There are 15 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of imageproxy is v0.11.2

            kandi-Quality Quality

              imageproxy has 0 bugs and 0 code smells.

            kandi-Security Security

              imageproxy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              imageproxy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              imageproxy is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              imageproxy releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 2449 lines of code, 98 functions and 16 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of imageproxy
            Get all kandi verified functions for this library.

            imageproxy Key Features

            No Key Features are available at this moment for imageproxy.

            imageproxy Examples and Code Snippets

            No Code Snippets are available at this moment for imageproxy.

            Community Discussions

            QUESTION

            Capture a picture in Android, and work with it using the ImageAnalyzer
            Asked 2022-Mar-23 at 19:12

            I am trying to implement a solution that would be able to capture a picture from the phone's camera, then operate the picture (do something with it) and repeat this process N times, quickly.

            I have achieved this using the imageCapture.takePicture method, but when trying to implement the same process for N pictures, the onCaptureSuccess method is being called every ~500ms (on a solid Samsung device). The process of capturing and saving the picture lasts too long for me. I need it to be quicker than 500ms.

            I was looking to implement it using the imageAnalyzer class, and used code similar to this:

            ...

            ANSWER

            Answered 2022-Mar-23 at 19:12

            The default image format is YUV_420_888 and as your buffer is only one plane (the Luminance(Y) plane ) the buffer is of pixels that are only a single byte in size.

            copyPixelsFromBuffer assumes that the buffer is in the same colour space as the bitmap, so as you set the bitmap format to ARGB_8888 then it is looking for 4 bytes per pixel not 1 byte per pixel you are giving it.

            I've not used this but this page has a ImageProxy.toBitmap example to convert a YUV to Bitmap via a Jpeg (if you just wanted a Jpeg you could skip the last step)

            I've also seen another method not via Jpeg but to directly change the colorspace of YUV to a bitmap.

            You can of course change to the only other colour space ImageAnalysis supports of ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888 which takes longer to be captured because it needs converting and is still not the right format for a Bitmap

            Source https://stackoverflow.com/questions/71591275

            QUESTION

            How to draw a rectangle with the real scale of the object?
            Asked 2022-Mar-01 at 10:08

            I'm using the MLKit library for barcode scanning, so I can get a rectangle where is actually the barcode. But I'm getting a rectangle that is little than the barcode and it's not in the right position. So, the scale and the position of the rectangle are wrong.

            Can anyone knows how to fix this problem? Is there any method that could re-scale and re-position the rectangle with the real measures?

            Thank you :)

            Here is my code:

            ...

            ANSWER

            Answered 2022-Mar-01 at 10:08

            You can take a look at ML Kit sample which contains the CameraX scenario or check here to learn more about the coordinate transformation.

            Source https://stackoverflow.com/questions/69840950

            QUESTION

            Camera analysis only entering to analyze method in ImageAnalysis.Analyzer only once, in Xiaomi Mi a20 Lite
            Asked 2021-Nov-30 at 00:19

            The analysis works fine in every other Android phone I've tried (Huawei Mate 20 Pro, Samsung S8, Samsung J7 and Samsung S10+), but not in the Xiaomi Mi a20 Lite. It only enters once the the analyze function and then in the Logcat throws:

            ...

            ANSWER

            Answered 2021-Nov-16 at 16:20

            The problem was solved changing the image strategy when building:

            Source https://stackoverflow.com/questions/69992636

            QUESTION

            ML Kit Barcode scanner picks up wrong scans sometimes
            Asked 2021-Nov-05 at 17:38

            I am trying to make a barcode scanner using ML Kit and CameraX. My program would pick up the wrong scan once in a while and I have download several apps using ML Kit from google play and they have the same issue, I tested on other phones too. On the other hand, the ML Kit quick start app I pulled from Github works correctly so it has to be my code. Can anyone help me to find the issue ? I cannot upload img yet you can use online barcode generator (code 128) and create barcode for PAN/230954 my app will read as PAN/2 30954☒. Here is the barcode

            MainActivity.java

            ...

            ANSWER

            Answered 2021-Nov-05 at 17:38

            I found the issue. I used barcode.getRawValue() which return the raw value. For the barcode I tried to scan the checksum is 29 so the raw value is the barcode text + char with acii code 29. So I used barcode.getDisplayValue() instead

            Source https://stackoverflow.com/questions/69847084

            QUESTION

            CameraX: Output of ImageAnalysis looks corrupted/scattered
            Asked 2021-Oct-22 at 03:03

            I'm working on an QR scanning application that is based on CameraX. The scanning works as expected on most devices except a few random devices. After debugging this issue for a long time, I found out that the cropped image is kind of shattered on the device in which scanning wasn't working.

            Expected output (works on Pixel Device):

            Current output (on the devices in which scanning is not working):

            The analyze method that receives each frame (part of the CustomImageAnalyzer class)

            ...

            ANSWER

            Answered 2021-Oct-22 at 03:03

            some device have rotation special. you can use imageProxy.getImageInfo().getRotationDegrees() to get correct rotation of image. references with (ImageInfo) https://developer.android.com/reference/androidx/camera/core/ImageInfo#getRotationDegrees()

            Source https://stackoverflow.com/questions/69245636

            QUESTION

            Firebase Barcode scanner using Jetpack compose not working
            Asked 2021-Oct-18 at 15:34

            Trying to migrate barcode scanner to Jetpack compose and updating camera and ML Kit dependencies to latest version.

            The current shows the camera view correctly, but it is not scanning the barcodes.
            The ImageAnalysis analyzer runs only once.

            Code

            ...

            ANSWER

            Answered 2021-Oct-18 at 15:34

            Thanks to Adrian's comment.

            It worked after the following changes.

            In BarcodeAnalyser

            1. Removed imageProxy.close() from addOnSuccessListener and addOnFailureListener. Added it to addOnCompleteListener.
            2. Added imageProxy.close() in else condition as well.

            Source https://stackoverflow.com/questions/69618411

            QUESTION

            How to create Bitmap from Android MediaImage in OUTPUT_IMAGE_FORMAT_RGBA_8888 format?
            Asked 2021-Sep-16 at 12:26

            I am trying to use this new feature of CameraX Image Analysis (version 1.1.0-alpha08): using setOutputImageFormat(ImageAnalysis.OUTPUT_IMAGE_FORMAT_RGBA_8888), images sent to the analyzer will have RGBA format.

            See this for reference: https://developer.android.com/reference/androidx/camera/core/ImageAnalysis#OUTPUT_IMAGE_FORMAT_RGBA_8888

            I need to turn the image sent to the analyzer into a Bitmap so that I can input it to a TensorFlow classifier. Without this new feature I would receive the image in the standard YUV_420_888 format then I would have to use one of the several solutions that can be googled in order to turn YUV_420_888 to RGBA then to Bitmap. Like this: https://blog.minhazav.dev/how-to-convert-yuv-420-sp-android.media.Image-to-Bitmap-or-jpeg/. I assume getting the Media Image directly in RGBA format should help me avoid implementing those painfull solutions (that I have actually tried and do not seem to work very well for me so far).

            Problem is I don't know how to turn this RGBA Media Image into a Bitmap. I have noticed that calling mediaImage.getFormat() returns 1 which is not an ImageFormat value but a PixelFormat one, the one logically corresponding to RGBA_8888 format, which is in line with the documentation: "All ImageProxy sent to ImageAnalysis.Analyzer.analyze(ImageProxy) will have format PixelFormat.RGBA_8888".

            I have tried this:

            ...

            ANSWER

            Answered 2021-Sep-16 at 12:26

            I actually found a solution myself, so I post it here if anyone is interested:

            Source https://stackoverflow.com/questions/69151779

            QUESTION

            Get all text inside box in a preview camerax android
            Asked 2021-Aug-19 at 14:17

            i want to analyse all text that is just inside by box that i have in a preview camera. But im getting wrong coordinates for text.

            Validation is done on contains

            ...

            ANSWER

            Answered 2021-Aug-19 at 14:17

            The difficulty that you are having is getting a good mapping from the image in the ImageProxy to what is displayed by the PreviewView. Although this sounds easy, I don't believe there is straightforward way to do this mapping. See the answer to a similar question. I took a look at implementing each of the suggestions in this answer and, although they worked in some situations, they failed in others. Of course, I could have taken the wrong approach.

            I have come to the conclusion that extracting and analyzing a bitmap extracted from the preview area and identifying those words that are completely enclosed by the red rectangle is the simplest. I circumscribe those words with their own red rectangle to show that they have been correctly identified.

            The following is the reworked activity, a graphic overlay the produces the word boxes and the XML for the display. Comments are in the code. Good luck!

            TestPhotoscan.kt

            Source https://stackoverflow.com/questions/68730714

            QUESTION

            How can I find out why a docker container is no longer running?
            Asked 2021-Aug-14 at 15:38

            On one of my AWS server I have manually started a detached Docker container running willnorris/imageproxy. With no warning, it seems to go down after a few days, for no apparent (external) reason. I checked the container logs and the syslog and found nothing.

            How can I find out what goes wrong (this happens every time)?

            This is how I start it:

            ...

            ANSWER

            Answered 2021-Aug-14 at 15:38

            As this exit seemed to originate outside of the container/Docker, I needed to find the right logs. A linked-to question (which essentially makes this a dupe) hinted to checking out journald on unix systems. Doing journald -u docker (essentially grepping the log for docker) showed that the Docker container was killed on August 6:

            Source https://stackoverflow.com/questions/68780402

            QUESTION

            CameraX implementation with ZXing 1D barcode reader, ImageProxy is rotated 90 degrees from the target and can't find a way to rotate it
            Asked 2021-Jul-14 at 09:08

            I am trying to use CameraX with ZXing library to identify barcodes, I am using ImageAnalyzer to get ImageProxy and feed its byte array to the PlanarYUVLuminanceSource to handle it by ZXing. My target rotation is 0 and the imageProxy that is coming from the camera is 90 degrees, so the barcode is not readable until I rotate it 90 degrees. here is the code:

            ...

            ANSWER

            Answered 2021-Jul-14 at 09:08
            byte[] data = ImageUtil.imageToJpegByteArray(imageProxy);
            Bitmap bitmap= BitmapFactory.decodeByteArray(data, 0, data.size)
            

            Source https://stackoverflow.com/questions/68369895

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install imageproxy

            Install the package using:.

            Support

            Imageproxy can proxy remote webp images, but they will be served in either jpeg or png format (this is because the golang webp library only supports webp decoding) if any transformation is requested. If no format is specified, imageproxy will use jpeg by default. If no transformation is requested (for example, if you are just using imageproxy as an SSL proxy) then the original webp image will be served as-is without any format conversion. Because so few browsers support tiff images, they will be converted to jpeg by default if any transformation is requested. To force encoding as tiff, pass the "tiff" option. Like webp, tiff images will be served as-is without any format conversion if no transformation is requested. Run imageproxy -help for a complete list of flags the command accepts. If you want to use a different caching implementation, it's probably easiest to just make a copy of cmd/imageproxy/main.go and customize it to fit your needs... it's a very simple command.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/willnorris/imageproxy.git

          • CLI

            gh repo clone willnorris/imageproxy

          • sshUrl

            git@github.com:willnorris/imageproxy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Proxy Libraries

            frp

            by fatedier

            shadowsocks-windows

            by shadowsocks

            v2ray-core

            by v2ray

            caddy

            by caddyserver

            XX-Net

            by XX-net

            Try Top Libraries by willnorris

            microformats

            by willnorrisGo

            rfcdash

            by willnorrisHTML

            wordpress-snowflake

            by willnorrisPHP

            wordpress-hum

            by willnorrisPHP

            webmention

            by willnorrisGo