image-conversion

Why would converting CMYK image to sRGB for display on web work locally, but not on prod server?

梦想与她 提交于 2020-06-29 04:24:12
问题 Our graphic artist is delivering image ready for print in CMYK colorspace JPG format, which is correct for printing. I am converting these for display on the web. I understand the "best" thing to do is convert the src.jpg to sRGB colorspace. I've tried both command line using convert and Imagick approach using transformImageColorspace() and find it works fine on my local machine (Fedora 32 Linux) but doesn't work on the production server (CentOS 7.3 Linux). We've had this process working for

Problems with using a rough greyscale algorithm?

此生再无相见时 提交于 2020-02-18 05:39:36
问题 So I'm designing a few programs for editing photos in python using PIL and one of them was converting an image to greyscale (I'm avoiding the use of any functions from PIL ). The algorithm I've employed is simple: for each pixel (colour-depth is 24), I've calculated the average of the R , G and B values and set the RGB values to this average. My program was producing greyscale images which seemed accurate, but I was wondering if I'd employed the correct algorithm, and I came across this

Problems with using a rough greyscale algorithm?

半世苍凉 提交于 2020-02-18 05:38:05
问题 So I'm designing a few programs for editing photos in python using PIL and one of them was converting an image to greyscale (I'm avoiding the use of any functions from PIL ). The algorithm I've employed is simple: for each pixel (colour-depth is 24), I've calculated the average of the R , G and B values and set the RGB values to this average. My program was producing greyscale images which seemed accurate, but I was wondering if I'd employed the correct algorithm, and I came across this

Spring-MVC, Java : Creating URL for image saved on FileSystem

我的梦境 提交于 2020-02-02 15:19:26
问题 I am working on a Spring-MVC application in which for the user, we are saving the thumbnail on the filesystem itself. Now for chat, I want to create a URL for the thumbnail saved on the filesystem and pass it on in the frontend. For example : Image is saved at /home/username/datadir/personid.png I would like to give the url something like : domainname.com/personid.png Please note PersonId is unique, so I can use that constraint. The part to save the image is complete, I just don't know how to

Save Bitmap with transparency to PNG in Delphi 2007

断了今生、忘了曾经 提交于 2020-01-24 09:42:25
问题 I have a Delphi bitmap (32Bit) that has transparency information. I need to convert and save it to a PNG file while preserving the transparency. The tools I currently have are the graphics32 Library, GR32_PNG (by Christian Budde), and PNGImage (by Gustavo daud). What is the best way to do this? EDIT 1 : There is not just one color in my bitmap that's transparent but pixels with varying levels of transparency that needs to be preserved. EDIT 2 : I am getting my bitmap with alpha information by

How to convert 3D models to SVG line art?

送分小仙女□ 提交于 2020-01-24 01:09:14
问题 I often work with 3D CAD models, which I receive as SolidWorks or PDF files. I need to turn them into black & white line art, like you'd find in a patent application. (In fact, exactly like what you find in a patent application!) Acrobat-9 allows me to rotate & scale the models, so I can print them with reasonable resolution, but the rest of my drawing toolchain deals with SVG files, while all I can get out of Acrobat is bitmaps. (I also make models from scratch in Blender, and make line

JPEG encoder super slow, how to Optimize it?

可紊 提交于 2020-01-11 09:52:57
问题 I'm building an App with actionscript 3.0 in my Flash builder. This is a followup question this question. I need to upload the bytearray to my server, but the function i use to convert the bitmapdata to a ByteArray is super slow, So slow it freezes up my mobile device. my code is as follows: var jpgenc:JPEGEncoder = new JPEGEncoder(50); trace('encode'); //encode the bitmapdata object and keep the encoded ByteArray var imgByteArray:ByteArray = jpgenc.encode(bitmap); temp2 = File

JPEG encoder super slow, how to Optimize it?

别来无恙 提交于 2020-01-11 09:51:30
问题 I'm building an App with actionscript 3.0 in my Flash builder. This is a followup question this question. I need to upload the bytearray to my server, but the function i use to convert the bitmapdata to a ByteArray is super slow, So slow it freezes up my mobile device. my code is as follows: var jpgenc:JPEGEncoder = new JPEGEncoder(50); trace('encode'); //encode the bitmapdata object and keep the encoded ByteArray var imgByteArray:ByteArray = jpgenc.encode(bitmap); temp2 = File

Conversion PDF to PNG or JPEG is very very slow using ImageMagick

谁说我不能喝 提交于 2020-01-10 16:36:42
问题 I have a working PDF to PNG conversion script using PHP and ImageMagick but I am having a problem with the speed of the conversion. I know it works because with a very small PDF the time taken to convert is not that great, but with a 250kb file (still not that large really) it takes in excess of 20 minutes to convert. Here's the PHP: //***** GET PATH TO IMAGEMAGICK ***** $path_to_imagemagick = trim(`which convert`); //***** PATH TO PDF TO CONVERT ***** $path_to_pdf = getcwd() . "/pdf/myfile

Conversion PDF to PNG or JPEG is very very slow using ImageMagick

自闭症网瘾萝莉.ら 提交于 2020-01-10 16:34:10
问题 I have a working PDF to PNG conversion script using PHP and ImageMagick but I am having a problem with the speed of the conversion. I know it works because with a very small PDF the time taken to convert is not that great, but with a 250kb file (still not that large really) it takes in excess of 20 minutes to convert. Here's the PHP: //***** GET PATH TO IMAGEMAGICK ***** $path_to_imagemagick = trim(`which convert`); //***** PATH TO PDF TO CONVERT ***** $path_to_pdf = getcwd() . "/pdf/myfile