image-manipulation

How to convert Java Image into JPEG array of bytes?

China☆狼群 提交于 2019-12-11 14:49:06
问题 Is there a way to convert a Java Image, encode it into JPEG (but not saving it to a file), and store it as an array of bytes? (byte[]) I need the JPEG-encoded image as an array of bytes. 回答1: ImageIO has a number of methods for reading and writing images. For writing to array of bytes, you can write to ByteArrayOutputStream. And then call toByteArray[] of the stream object to obtain the byte array. 来源: https://stackoverflow.com/questions/2568150/how-to-convert-java-image-into-jpeg-array-of

Laravel Glide not finding images at urls with extension

回眸只為那壹抹淺笑 提交于 2019-12-11 12:12:49
问题 I am using Glide, and followed this video https://vimeo.com/118089742 which basically is a walk-through for the instructions on the official site http://glide.thephpleague.com/ Here is my service provider: $this->app->singleton('League\Glide\Server', function ($app) { return \League\Glide\ServerFactory::create([ 'source' => public_path(), 'cache' => public_path(), 'source_path_prefix' => 'images/uploads', 'cache_path_prefix' => 'images/cache', 'base_url' => '/img/', ]); }); And here is my

Is there a way to know the offsets of interlacing blocks in image files?

十年热恋 提交于 2019-12-11 10:43:10
问题 That is, if I have image.png and it happens to be an interlaced image, I would like to split the file at the exact offsets where an interlacing block is present. I would like to have the same thing for progressive .jpg files. I can read the specs and try to figure it out from there, but it would be nice if such a thing existed in e.g. ImageMagic or any other library/tool. 来源: https://stackoverflow.com/questions/35308473/is-there-a-way-to-know-the-offsets-of-interlacing-blocks-in-image-files

Serverside image processing

坚强是说给别人听的谎言 提交于 2019-12-11 09:16:33
问题 I am designing a web application that does server side image processing in real time. Processing tasks include applying different effects like grayscale, blur, oil paint, pencil sketch etc on images in various formats. I want to build it using java/servlets which I am already familiar with. I found 3 options, 1) Use pure java imaging libraries like java.awt or http://www.jhlabs.com/ip/index.html 2) Use command line tools like Gimp/ImageMagick 3) Use c,c++ image libraries that have java

PHP Image Resize and Cropping

烂漫一生 提交于 2019-12-11 06:43:08
问题 Is there anything out there in the PHP world with equivalent functionality to SORL thumbnail (a Django project). Specifically: 1) It caches results (generating thumbnails on the fly is too cpu intensive). 2) It provides a smart cropping feature that crops to fit based on image entropy (so it doesn't just crop to center, but rather crops where the 'action' is). The big feature I'm looking for is the smart cropping ability. 回答1: Only image manipulator I knew off the bat was php.net/manual/en

C# - How to change PNG quality or color depth

核能气质少年 提交于 2019-12-11 06:39:31
问题 I am supposed to write a program that gets some PNG images from the user, does some simple edits like rotation and saves them inside a JAR file so that it can use the images as resources. The problem is when I open, say an 80kb image and then save it with C#, I get an image with the same quality but for 130kb space. And because it has to go inside a J2ME jar file I really need lower sizes, at least the original size. I tried the code below but later found out that it only works for Jpeg

Photo application

一笑奈何 提交于 2019-12-11 06:13:32
问题 I'm developing an application just for fun that consists of capturing images from a webcam. What I would like to know is how can I apply some filters to the image that I capture? Ideally I would like to develop something like Apple iPhoto; something that defaces the image. The programming language I am using is C#. 回答1: if you wnat to implement the filter algorithms, first of all you have to find all operations involved in the algorithm (also a simple low-pass can involve a bit of work) and

Image manipulation using java

 ̄綄美尐妖づ 提交于 2019-12-11 05:17:14
问题 i'm trying to create a program that generates images for use as multi-screen backgrounds, i'm doing this targeted at windows (in my case, 7 so that basically i can get images to change without seeing the same image on two different screens) in my program, i read multiple image input files and compile them into a single output image that is the total size of the desktop (including black areas not seen on screens) my question is, what class/methods are good for cropping/resizing/pasting into a

How to generate a mask using Pillow's Image.load() function

可紊 提交于 2019-12-11 02:56:38
问题 I want to create a mask based on certain pixel values. For example: every pixel where B > 200 The Image.load() method seems to be exactly what I need for identifying the pixels with these values, but I can't seem to figure out how to take all these pixels and create a mask image out of them. R, G, B = 0, 1, 2 pixels = self.input_image.get_value().load() width, height = self.input_image.get_value().size for y in range(0, height): for x in range(0, width): if pixels[x, y][B] > 200: print("%s -