-1

How do I convert from .ppm to .png? I am using C++ in Visual Studio 2017.

I have heard about Magick++, but I don't know how to download or use it. Can someone provide a download link for Windows 32bit? (Got 64bit processor, but don't want to mess other bits up).

Are there any other libraries which might be suitable for this?

Thanks!

EDIT

I no longer need to convert this, I just used an online converter instead.

George_E -old
  • 188
  • 1
  • 3
  • 17
  • 2
    There are many libraries which can do image conversion. However asking for such libraries is off-topic. – Some programmer dude Feb 25 '18 at 16:13
  • @Someprogrammerdude How is it off topic? This is the question I am asking – George_E -old Feb 25 '18 at 16:14
  • *"Got 64bit processor, but don't want to mess other bits up"* - I'm still trying to understand what this sentence is supposed to mean – UnholySheep Feb 25 '18 at 16:15
  • @UnholySheep I am in a 32bit project, so I thought it might mess up the project. I don't know... – George_E -old Feb 25 '18 at 16:16
  • You could get the file format for PPM files, and then write a C++ program to extract the image. Then get the file format for PNG files, and then write a C++ program to write the image in the PNG format. Visual Studio 2017 supports 32-bit. – Eljay Feb 25 '18 at 16:17
  • From [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) from [the help pages](https://stackoverflow.com/help): "Questions asking us to *recommend or find a book, tool, software library, tutorial or other off-site resource* are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Some programmer dude Feb 25 '18 at 16:18
  • So please take some time to read [the help pages](http://stackoverflow.com/help), especially the sections named ["What topics can I ask about here?"](http://stackoverflow.com/help/on-topic) and ["What types of questions should I avoid asking?"](http://stackoverflow.com/help/dont-ask). Also please [take the tour](http://stackoverflow.com/tour) and [read about how to ask good questions](http://stackoverflow.com/help/how-to-ask). Lastly please learn how to create a [Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve). – Some programmer dude Feb 25 '18 at 16:18
  • @Eljay I have looked a lot at the formats, but I'll do some more research on how they are formatted. Thanks for your help – George_E -old Feb 25 '18 at 16:19
  • @George_E I don't think Eljays comment was a serious suggestion. Use a library. – Captain Giraffe Feb 25 '18 at 16:22
  • @CaptainGiraffe Well can you please suggest one? – George_E -old Feb 25 '18 at 16:31
  • See https://stackoverflow.com/questions/873976/fastest-c-c-image-resizing-library for instance. – Captain Giraffe Feb 25 '18 at 16:34
  • @CaptainGiraffe • I wasn't being unserious, either. I've done exactly that myself... but it was as part of my job, not a hobby project for fun. – Eljay Feb 25 '18 at 16:40

1 Answers1

0

You can use Freeimage , an open source software to convert to/from ppm to png. Use vcpkg to automatically install the freeimage libraries ( static or dynamic in x86 or x64) to your visual studio 2015 (or later). For example in powershell command you can type:

.\vcpkg install freeimage:x64-windows-static
seccpur
  • 4,996
  • 2
  • 13
  • 21