bpp

Reduce bit-depth of PNG files from the command line

拈花ヽ惹草 提交于 2020-01-03 17:47:09
问题 What command or series of commands could I execute from the CLI to recursively traverse a directory tree and reduce the bit-depth of all PNG files within that tree from 24bpp to 16bpp? Commands should preserve the alpha layer and should not increase the file size of the PNGs - in fact a decrease would be preferable. I have an OSX based system at my disposal and am familiar with the find command so am really more keen to to locate a suitable PNG utility command. 回答1: AFAIK the only PNG format

can generic Bluetooth dongle be used for printers that support printing over Bluetooth?

有些话、适合烂在心里 提交于 2019-12-25 18:27:50
问题 I have tried using a Bluetooth dongle (Advik) with my "KodakESP-3+2445" printer. I have created an Android client to connect to this printer. I select a UUID for OPP (Object Push Profile) and was able to obtain a BluetoothSocket and 'socket.write' a file to the printer. However, no print out was obtained from the printer. I tried other Bluetooth UUID such as (BIP, BPP, Direct Printing, SPP etc), but socket connection fails for each of these profiles, except OPP (Object Push Profile). I

32 bit depth jpg images problem in IE when referenced locally

北慕城南 提交于 2019-12-11 11:27:28
问题 We have an webbapplication that takes an image that will be uploaded and resized. The resize-library we used saved all pictures with 32-bit depth whatever the depth was before. We have an online client that can view the pictures via an html-file and all is fine there. All pictures are shown correctly. The problem: We also have an vb-winform application that download the pictures and show them in an html-file locally in an webbrowser control. But here all pictures are rejected (not rendered),

Losing image quality in c# using Image class (reduces amount of colors)

你离开我真会死。 提交于 2019-12-06 04:19:52
问题 I have a c# program that opens a .tif image and later offers the option to save it. However, there is always a drop in quality when saving the image. (EDIT:I passed some parameters while saving the image so that the quality is at 100 % and there is no compression, but the number of actual unique colors go from 254 to 16, even though the image properties show 8bpp) (EDIT2: The image in question is a grayscale image at 8 bits per pixel - 256 colors/shades of gray - This doesn't happen with a 24

Android: Save Bitmap object as a bmp (1bpp) file format

落花浮王杯 提交于 2019-12-05 03:57:00
问题 Based on this question asked by @ben75: Android : save a Bitmap to bmp file format My question now is: How can I have a BMP image with the depth of 1 bit per pixel (Black & White)? 回答1: Answering my own question... After some tough search all over the web I realized I had to create 2 things: a bitmap black and white - and did that using the approach of making all 0's for colors below 128 and 255's for the rest, like this (this is C# code, as I'm using Xamarin to code my app): private void

Losing image quality in c# using Image class (reduces amount of colors)

[亡魂溺海] 提交于 2019-12-04 10:13:25
I have a c# program that opens a .tif image and later offers the option to save it. However, there is always a drop in quality when saving the image. (EDIT:I passed some parameters while saving the image so that the quality is at 100 % and there is no compression, but the number of actual unique colors go from 254 to 16, even though the image properties show 8bpp) (EDIT2: The image in question is a grayscale image at 8 bits per pixel - 256 colors/shades of gray - This doesn't happen with a 24 bits per pixel color image that I tested where all the colors are retained. I am starting to think

Android: Save Bitmap object as a bmp (1bpp) file format

一曲冷凌霜 提交于 2019-12-03 21:01:07
Based on this question asked by @ben75: Android : save a Bitmap to bmp file format My question now is: How can I have a BMP image with the depth of 1 bit per pixel (Black & White)? Answering my own question... After some tough search all over the web I realized I had to create 2 things: a bitmap black and white - and did that using the approach of making all 0's for colors below 128 and 255's for the rest, like this (this is C# code, as I'm using Xamarin to code my app): private void ConvertArgbToOneColor (Bitmap bmpOriginal, int width, int height){ int pixel; int k = 0; int B=0,G=0,R=0; try{

How to convert an 8-bit OpenCV IplImage* to a 32-bit IplImage*?

*爱你&永不变心* 提交于 2019-11-26 23:14:49
问题 I need to convert an 8-bit IplImage to a 32-bits IplImage. Using documentation from all over the web I've tried the following things: // general code img2 = cvCreateImage(cvSize(img->width, img->height), 32, 3); int height = img->height; int width = img->width; int channels = img->nChannels; int step1 = img->widthStep; int step2 = img2->widthStep; int depth1 = img->depth; int depth2 = img2->depth; uchar *data1 = (uchar *)img->imageData; uchar *data2 = (uchar *)img2->imageData; for(h=0;h