I've got a 16 pixel high image that I've created in Paint.NET that I'd like to use in a Visual Studio toolbar.
My image is a .PDN file with multiple layers. Visual Studio requires a 32bpp BMP file. How do I convert the .PDN file to the correct format .BMP file?
I'm not looking to have this happen in my program.
I'm cool with having to do something manually whenever a change is made to the .PDN file, although I'd prefer something I can integrate with my automated build.
I've tried using the BmpX extension to Paint.NET, but it saves the background as white, rather than transparent. I've tried using ImageMagick's convert utility, but something's wrong with the saved BMP file, and VS displays it slightly corrupted and offset to the right by a couple of pixels.
Note: I'm using convert.exe by saving from Paint.NET as a .PNG file and then using convert strip.png strip.bmp. The transparency's correct, though.
It turns out that VS2010 can cope with .PNG files.
Related
I am using prawn to generate pdf files which have lots of images so they come out quite large. I can open the file in Adobe Acrobat and then save it using the "reduce file size" option, and a 164MB file shrunk to 7MB and retained all of the image quality. I would like to replicate this compression in Ruby. I have tried using the compression settings which prawn offers and they have not had any effect on the file size. I suspect there must be a way to do it with RMagick, but I haven't figured it out yet.
I apologize for not including any code samples showing what I have tried, but I removed the prawn compression settings when they didn't have any effect, so I don't have anything to show.
Have you tried simply making a copy of the PDF with RMagick? That is, read in the PDF and write it back out again.
Also, check with the ImageMagick folks at https://www.imagemagick.org/discourse-server/. Any advice they offer you can be implemented via RMagick.
I'm writing a WinJS app and it would be a nice feature to handle animated GIFs. After some research, if would seem that in order to do that, that the data is copied to the clipboard using the little know CF_GIF clipboard format
how to get animated gif image from browser clipboard api?
but looking over the WinJS documentation for clipboard formats
http://msdn.microsoft.com/en-US/library/windows/apps/windows.applicationmodel.datatransfer.standarddataformats
it doesn't seem like CF_GIF is available, and when I copy a GIF to the clipboard and look at dataPackageView with the command
var dataPackageView = Windows.ApplicationModel.DataTransfer.Clipboard.getContent();
it just shows up as a bitmap. Can anyone tell me if it is indeed possible to get an animated GIF from the clipboard or some kind of work around?
CF_Bitmap is the way to go here.
You COULD make a private data format, and put the entire GIF on there. And you could paste it into other instances of your app. But it wouldn't work with anything else, unless you also provided it as CF_Bitmap.
OK, there's another way. You could dump to a .gif file, then place the CF_HDROP (file pointer) onto the clipboard. Then when you paste, it's like pasting a file from windows explorer. That may work for some apps.
Yeah, like I said, use CF_Bitmap.
I am using Windows 8 RTM and Visual Studio Express 2012 for Windows Desktop. I am trying to write an application that uses UIRibbon in Visual C++. (Because I have the Express version only, I don't have access to MFC; please don't use it in your answer.)
The problem has to do with the icons I use in the ribbon. Because Windows 7 compatibility is a requirement for this project, I cannot use PNG images; I am stuck with old-school BMPs. The problem is that, while some of the BMPs are displaying correctly, most of the images have black bounding-boxes around them. I suspect the problem has to do with the BMP files, and is not in the ribbon XML file or in the code.
The BMP that displays correctly I downloaded off the Internet as part of a sample that I adapted. The BMPs that don't display correctly I extracted from an ICO file, then converted to a 32-bit image using the System.Drawing.Bitmap .NET API. (This conversion process is in done in a separate program as part of my build procedure, not at runtime.)
My question is: Does changing the bit depth of a BMP in this manner affect the colors in the image? And, if so, can anyone point out a free tool that can turn a PNG file into a 32-bit BMP file that works correctly in the Windows UIRibbon?
Do you speak of the Windows Ribbon Framework here? If so, you wouldn't be able to use PNGs anyway as the framework supports BMP only for Windows 7. With Windows 8 you can also use PNGs. See the regarding MSDN article for more information.
For a free tool which converts your PNGs into compatible BMP files, you should have a look at the visual designer that comes with the "Windows Ribbon Framework for Delphi".
You can simply load you XML markup into the editor and add your pictures. The editor will then convert the added files into BMPs if required. You can also use the editor to check if your Ribbon definition looks right. It produces valid "Windows Ribbon Framework" XML markup, so you can use the markup file in any other language such as C++, C# or Delphi for your further application development.
I have a Wordpress site (www.nurseresumetips.com) and I'm using a theme named JVPress.
This theme lets you to upload a custom header graphic. If you open the page in Firefox the header graphic displays, however when I open it in Internet Explorer 8 the image is not found.
The link that Wordpress is generating is: http://www.nurseresumetips.com/wp-content/uploads/20110419033853_nrt.jpg
This link works in Firefox but not in Internet Explorer.
I just want to know if anyone could point me in the right direction.
Thanks
Having looked around, I think you may be tripping over a problem like this, where your JPEG is encoded in a slightly odd format. Looks like CMYK is accepted as a format by some browsers, but not others.
Depending on your software, you might be able to find a way of saving in a more usual colour encoding -- in Photoshop, for example, try the specific "save for web" option.
Given the content of your image, I'd actually suggest saving the file as a PNG, anyway. JPEG is best for photographic images; for textual images like this one, PNG will probably (a) be more efficient, (b) look better -- no encoding artefacts around the nice solid lines you have, and (c) not have this odd problem you're facing.
I want to extract the Icon/Thumbnail (different size) of a file from
windows shell on my project. I am able to extract the thumbnail with
out any issue, but the problem came when working with files that don't
have thumbnail view. The issue is I am not able to get the bitmap as
the windows explorer shows. I am getting a black color where explorer
is showing a nice gray shadow.
I have uploaded
1. The image I got for an html file,
2. The image as shown by windows explorer,
3. The sample source code
at
http://www.fileflyer.com/view/seAOcBP
Any help here is appreciated.
Regards,
Manoj
The problem is how you save it. To have gradient alpha channel you need to save it as a PNG.