jpeg

Having an image file buffer in memory, what is the fastest way to create its thumbnail?

拜拜、爱过 提交于 2019-12-23 08:44:30
问题 Trying to create a an image acquiring application optimized for a fast scanner (which can provide up to 6 compressed images [color+gray+binary][front+rear] for each paper at speed of 150 ppm) I have some speed issues. Using TWAIN technology and memory buffer transfer mode (TWSX_MEMORY) I receive image buffer (as JPEG or TIFF file loaded in memory) from scanner and save it to my application destination path. If I do not want to create thumbnails, my application causes no speed loss for the

Do the libjpeg and the .Net jpeg codec really differ significantly on monochrome data?

▼魔方 西西 提交于 2019-12-23 07:09:00
问题 I work with a lot of monochrome image data and this morning I noticed that there appears to be a significant difference between the way libjpeg and the .Net jpeg codec handle monochrome data. It appears that a monochrome image saved at ANY quality setting using libjpeg and opened using the default .Net jpeg codec actually only loads with 16 different shades of gray and all intermediate shades are rendered as stippled. Here is the histogram of a smooth gradient saved by libjpeg and loaded by

Displaying data from arrays in a dynamic table PHP

喜夏-厌秋 提交于 2019-12-23 07:05:39
问题 I have a file with 20 pictures of country artists, and a text file with their websites. I'm trying to display this data in a 4 row 5 column table using PHP. I try to use a foreach loop that iterates for every 5 elements in the array (to load each row one by one) foreach(array_chunk($CountryArtists, 5, true) as $Value) { <table> <tr><td> $CountryArtists[$Value] $ArtistImages[$Value]</td> <td> $CountryArtists[$Value] $ArtistImages[$Value]</td> <td> $CountryArtists[$Value] $ArtistImages[$Value]<

MJPEG Stream from iPhone to Server

这一生的挚爱 提交于 2019-12-23 05:23:07
问题 I am writing an app to make an MJPEG-Stream from the iPhone to the Server. My problem is that the JPEG's I see are a weird collection of colored lines. I can post the specific code if more information is needed. These are the Steps: Get the frames via AVCaptureVideoDataOutput Convert them to an UIImage Get NSData UIImageJPEGRepresentation() from it Make an NSMutableData and wrap the Image with "Content-Type: image/jpeg" and --BOUNDARY Now i want to send them as UDP Packets to my server. I use

Looking for a managed image parser library (JPEG, BMP, PNG, GIF) [closed]

走远了吗. 提交于 2019-12-23 04:43:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am writing a discussion board software that will have "avatar" images for the users. I want to resize any picture that gets uploaded to a reasonable size. I could easily do that with System.Drawing but that is relying on GDI+ which has hat security problems before. The problem is that the images are untrusted.

RMagick returns nil reading JPEG

荒凉一梦 提交于 2019-12-23 04:43:07
问题 When I try to open a JPEG format file in Rails using RMagick, it always return nil with any jpg file. Other file formats open well. $ script/console Loading development environment (Rails 2.3.4) >> require 'RMagick' >> img = Image.read("1.gif").first => 1.gif GIF 230x100 230x100+0+0 PseudoClass 256c 8-bit 2kb >> img = Image.read("1.png").first => 1.png PNG 1280x800 1280x800+0+0 DirectClass 8-bit 156kb >> img = Image.read("1.jpg").first => nil Why this happens? 回答1: Do you have the jpeg

PIL: can't save the jpg pasted with a png

﹥>﹥吖頭↗ 提交于 2019-12-23 03:23:08
问题 I'm trying to paste a png on a jpg. Here is the code: #!/usr/bin/env python3 from PIL import Image from PIL import ImageDraw im = Image.open("existing.jpg") logo = Image.open("python-32.png") back = Image.new('RGBA', im.size) back.paste(im) poly = Image.new('RGBA', (512,512)) pdraw = ImageDraw.Draw(poly) pdraw.polygon([(128,128),(384,384),(128,384),(384,128)], fill=(255,255,255,127),outline=(255,255,255,255)) back.paste(poly, (0,0), mask=poly) back.paste(logo, (im.size[0]-logo.size[0], im

Sending multiple image files to mySQL

纵饮孤独 提交于 2019-12-23 02:51:12
问题 How do I send multiple jpg files, as byte arrays, to my mySQL database with C#? I have read and understand how to convert image files to byte arrays, but I can only figure out how to use that method for a single image to mySQL as a blob. My application requires the user to upload at least 2 image files and allows up to 10, while sending information from multiple textBox. I tried creating an array of byte arrays, but that didn't work. When I'd reference that array at a specific index during

Color Filter Technique OpenCV

妖精的绣舞 提交于 2019-12-22 16:45:15
问题 I am reading a picture and filtering out the colors and this is the result I get in the following images. The code is from the example folder in the opencv module. I am trying to feed the picture back to an A.R Drone 2.0 and have the drone follow the color white. How would I do the second part? var cv = require('C:/users/danny/codes/node_modules/opencv/lib/opencv'); // (B)lue, (G)reen, (R)ed var lower_threshold = [220, 220, 220]; var upper_threshold = [255, 255, 255]; //var lower_threshold =

How to make gif images from a set of images in matlab?

放肆的年华 提交于 2019-12-22 15:02:30
问题 How to make '.gif' image from a set of '.jpg' images (say: I1.jpg, I2.jpg,..., I10.jpg) in matlab? 回答1: Ok here is a simple example. I got an image with a unicorn on it and remove 2 part to create 3 different images, just for the sake of creating an animated gif. Here is what it looks like: clear clc %// Image source: http:\\giantbomb.com A = rgb2gray(imread('Unicorn1.jpg')); B = rgb2gray(imread('Unicorn2.jpg')); C = rgb2gray(imread('Unicorn3.jpg')); ImageCell = {A;B;C}; figure; subplot(131)