png

Base64 jpg to base64 Png in Ruby

与世无争的帅哥 提交于 2019-12-24 11:37:33
问题 I'm working with base64 files and i would like to convert a base64jpg image in a base64png image. Is there a way to do it? The reason is i'm using rsvg-convert to convert svg files into png files, but when i have a base64jpg in my svg, it's not working, But it works with base64 files. 回答1: In ImageMagick, this works for me. Create JPG base 64 file: convert rose: rose.jpg convert rose.jpg inline:rose_base64jpg The text file rose_base64jpg shows: data:image/jpeg;base64,/9j

Compressing an NSKeyedArchiver file that included UIImageView with loaded image

血红的双手。 提交于 2019-12-24 11:37:11
问题 I have a view with an UIImageView. It was loaded with either jpg or png image format. Says the jpg image version has a data size of 100k. I then used NSKeyedArchiver to save my view to a file. The size of the file is getting about 3MB. If I used the png version of the image, the archived file is still around 3MB. I then used zlib to compress the archived file. But it does not seem to have much effect. Anything I can do to get it back to close as much as possible the 100k area? BTW: If I used

How do I make a rollover using png and jquery?

一笑奈何 提交于 2019-12-24 11:15:11
问题 I reverse coded a script I found online and it works well, the only problem is that the hover image loads at complete visibility until the action of hover occurs. This is the script: $(document).ready(function() { $("img.b").hover( function() { $(this).stop().animate({"opacity": "1"}, "slow"); }, function() { $(this).stop().animate({"opacity": "0"}, "slow"); }); }); </script> This is the CSS file: <style> div.fadehover { position: relative; } img.b { position: absolute; left: 0; top: 0; z

Can I specify scaling when using the cairosvg module inside of python

妖精的绣舞 提交于 2019-12-24 10:58:25
问题 The command line version of cairosvg allows scaling. Here is the output of the help function: cairosvg -h usage: cairosvg [-h] [-v] [-f {pdf,png,ps,svg}] [-d DPI] [-W WIDTH] [-H HEIGHT] [-s SCALE] [-u] [-o OUTPUT] input CairoSVG - A simple SVG converter based on Cairo. positional arguments: input input filename or URL optional arguments: -h, --help show this help message and exit -v, --version show program\'s version number and exit -f {pdf,png,ps,svg}, --format {pdf,png,ps,svg} output format

AS 3 | Cloning Png image data

断了今生、忘了曾经 提交于 2019-12-24 09:58:03
问题 I need to clone .png image data loaded from server in AS3, so that I am not required to load same data again and again from server. After a search on cloning image data in AS3 I was able to find following code over internet clone = new Bitmap(Bitmap(this._loader.content).bitmapData.clone() ) By using this code I am able to clone bitmap data but the problem which I am facing is that my png background is transparent. If I typecast loaded png data to bitmap my icons background becomes white. Any

c# chart.object from excel as .png low resolution

試著忘記壹切 提交于 2019-12-24 07:47:00
问题 I have created an excel file and want to export its contents as a png or jpeg file. Unfortunately the quality of the image is really low. Is there a solution to this? I wish a really high resolution picture. Thank you My current code (from internet): Excel.Range xlRange = xlWorksheet5.get_Range("A1", "K30"); xlRange.CopyPicture(Excel.XlPictureAppearance.xlScreen, Excel.XlCopyPictureFormat.xlPicture); Excel.ChartObject chartObj; chartObj = xlWorksheet5.ChartObjects().Add(xlRange.Left, xlRange

graphicsmagick is doubling the size of “some” PNG files

不问归期 提交于 2019-12-24 07:05:19
问题 Using GraphicsMagick to read in a PNG file and write it out under a different name is causing the file size to increase by more than double. This only happens to some PNG files and I can't figure out what is causing it. Example problem PNG: http://www.google.co.in/logos/2011/verne-hp-3.png I have tried everything from disabling the opacity channel to using different compression types to changing the interlacing type but nothing is helping me understand what is causing this problem. If anyone

Building a fast PNG encoder issues

谁说我不能喝 提交于 2019-12-24 07:01:16
问题 I am trying to build a fast 8-bit greyscale PNG encoder. Unfortunately I must be misunderstanding part of the spec. Smaller image sizes seem to work, but the larger ones will only open in some image viewers. This image (with multiple DEFLATE Blocks) gives a "Decompression error in IDAT" error in my image viewer but opens fine in my browser: This image has just one DEFLATE block but also gives an error: Below I will outline what I put in my IDAT chunk in case you can easily spot any mistakes

Fatal Error in convert PPT to PNG in PHP

佐手、 提交于 2019-12-24 06:48:41
问题 I want to convert PPT to PNG with PHP. I wrote the following piece of code to solve the problem: $powerpnt = new COM("PowerPoint.Application") or die('could not create the powerpoint instance'); $powerpnt->Visible = True; $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); $FileName = "MyPP"; $powerpnt->Presentations->Open("D:\\MySlide.ppt"); /* This is line #16 */ $powerpnt->ActivePresentation->SaveAs($strPath."/".$FileName,17); $powerpnt->Quit; $powerpnt = null; But I got the

GridFS : How to display the result of readstream.pipe(res) in an <img/> tag?

≯℡__Kan透↙ 提交于 2019-12-24 06:32:10
问题 I am using MangoDB along with GridFS to store images. I've got this route to retrieve an image from the DB : app.get("/images/profile/:uId", function (req, res) { let uId = req.params.uId; console.log(uId) gfs.files.findOne( { "metadata.owner": uId, "metadata.type": 'profile' } , function (err, file) { if (err || !file) { return res.status(404).send({ error: 'Image not found' }); } var readstream = gfs.createReadStream({ filename: file.filename }); readstream.on("error", function (err) { res