jpeg

Android camera2 jpeg framerate

南楼画角 提交于 2020-07-05 07:56:05
问题 I am trying to save image sequences with fixed framerates (preferably up to 30) on an android device with FULL capability for camera2 (Galaxy S7), but I am unable to a) get a steady framerate, b) reach even 20fps (with jpeg encoding). I already included the suggestions from Android camera2 capture burst is too slow. The minimum frame duration for JPEG is 33.33 milliseconds (for resolutions below 1920x1080) according to characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)

Reading quantization tables of jpeg files on Android

流过昼夜 提交于 2020-06-28 06:42:05
问题 The bounty expires in 5 days . Answers to this question are eligible for a +300 reputation bounty. BioGeek wants to draw more attention to this question. A previous answer provides code for reading the quantization tables of jpeg files in Java. However it uses javax.imageio.ImageIO which, according to this answer, isn't available on the Android platform. How can I read read the quantization tables of jpeg files on Android in Kotlin or the Java subset available on Android? edit I have found

How can I insert EXIF/other metadata into a JPEG stored in a memory buffer?

六眼飞鱼酱① 提交于 2020-06-25 05:13:49
问题 I have created a JPEG using Python OpenCV, EXIF data being lost in the process and apparently not being able to be re-added when calling imwrite (reference: Can't keep image exif data when editing it with opencv in python). Two questions: In general, how can I write the original EXIF data/new custom metadata into a JPEG that exists in memory rather than a file? Would pillow/PIL be able to maintain the EXIF data and allow supplementary metadata to be added? As of 2013 (reference: how maintain

Loading JPEG file from resources in MFC C++ application

让人想犯罪 __ 提交于 2020-06-17 02:07:28
问题 The following code works correctly under Windows XP: CImage image; RECT destRect; int nResource = 10; CResourceStream stream(0, MAKEINTRESOURCE(nResource), _T("JPEG")); HRESULT hr = image.Load(&stream); image.Draw(hDC, destRect); But on Windows 7 image.Load returns E_FAIL though creating CResourceStream reads JPEG file from resources correctly. Debugging gives the following result: GdipCreateBitmapFromStream returns InvalidParameter . What the problem can be? JPEG is a custom category in

FFMPEG add image at the end of a video

旧时模样 提交于 2020-06-12 06:50:14
问题 I need to add an image for one second at the end of a .mp4 video file using FFMPEG. My video size is WxH and my image size is MxM, so video and image sizes are different. I have tried different options in order to add the image at the end of the video as: ffmpeg -i "concat: videoIn.mp4|image.jpg" -c copy videoOut.mp4 or ffmpeg -i videoIn.mp4 -loop 1 -t 1 -i image.jpg -f lavfi -t 2 -i anullsrc -filter_complex "[0:v][0:a][1:v][2:a] concat = n=2:v=1:a=1[v][a] -c:v libx264 -c:a aac -strict -2

How to convert a PDF into JPG with commandline in linux?

非 Y 不嫁゛ 提交于 2020-06-10 11:05:30
问题 What are fast and reliable ways converting a PDF into a (single) JPEG using linux commandline? 回答1: You can try imagemagick repository and then convert utility: $ sudo apt-get install imagemagick $ convert input.pdf output.jpg And alternatively other syntax depends on linux distribution. 回答2: Convert from imagemagick seems do a good job: convert file.pdf test.jpg and in case multiple files were generated: convert test-0.jpg --append test-1.jpg ... --append one.jpg to generate a single file,

How can I catch corrupt JPEGs when loading an image with imread() in OpenCV?

荒凉一梦 提交于 2020-05-14 14:39:50
问题 OpenCV says something like Corrupt JPEG data: premature end of data segment or Corrupt JPEG data: bad Huffman code or Corrupt JPEG data: 22 extraneous bytes before marker 0xd9 when loading a corrupt jpeg image with imread(). Can I somehow catch that? Why would I get this information otherwise? Do I have to check the binary file on my own? 回答1: You cannot catch it if you use imread() . However there is imdecode() function that is called by imread() . Maybe it gives you more feedback. For this

How to save lossless jpg in java?

老子叫甜甜 提交于 2020-05-02 05:30:14
问题 I have to save a jpeg image lossless. I am work on a steganography project but Java compressing and saving my result. I research every forums and try everything but it didn't work. Here my example code for lossless save a jpeg image: BufferedImage image = ImageIO.read(new File("sources/image.jpg")); ImageWriter writer = ImageIO.getImageWritersByFormatName("JPEG").next(); JPEGImageWriteParam jpegParams = new JPEGImageWriteParam(null); jpegParams.setCompressionMode(ImageWriteParam.MODE_EXPLICIT

Carrierwave: convert an uploaded PNG to JPG by replacing the original version

早过忘川 提交于 2020-03-25 18:47:29
问题 I have the following model: class ScreenshotUploader < CarrierWave::Uploader::Base include CarrierWave::MiniMagick storage :file convert :jpg version :thumb do process resize_to_fill: [50, 50] end def extension_whitelist %w(jpg jpeg gif png) end version :print do process border: ['black'] process quality: 80 end end The upload of the image happens via pasting an image from the clipboard via https://github.com/layerssss/paste.js and is saved as a base64 encoded string into a <textarea> , then

Convert HEIC bytearray to JPG/PNG bytearray

廉价感情. 提交于 2020-02-16 10:29:49
问题 I'm having trouble with HEIC image format in my team's project. Currently we are grabbing the bytearray of the image date and displaying it into our mobile app, but other issues occur when we want to do more with the image format. Is it possible to convert the HEIC bytearray to some other format like PNG bytearray? Here's what I got private async Task ProcessPhotos(IList<Models.MediaFile> mediaFiles) { Debug.WriteLine(DateTime.Now.CurrentTimeWithMilliSeconds(), "Process Photos Start");