Easy. Backslashes need to be escaped in C++: "C:\lena2.jpg" -> "C:\\lena2.jpg".
Easy. Backslashes need to be escaped in C++: "C:\lena2.jpg" -> "C:\\lena2.jpg".
... or use forward slashes for file paths everywhere in your code, avoid the missing backslash pain, and increase portability (although not with explicit drive letter references). Also, on some versions of Windows, and in many corporate environments, writing the the root of the C: drive is forbidden for non-privileged users.
Thank you very much, I solve my problem.
But I still have other question, how could I change
the format of the picture by Qt?I would like to
read the other format of the QImage support,
but some of them are hard to find, so I want to transfer
them to the format I lack and try to do some pixel manipulation
about them.
I'll answer the obvious question. The remaining statements make little sense.
Load an image in one format using QImage::load() or QImage::loadFromData() and write the image to file in another format using QImage::save(). The supported formats are in the docs for QImage and QImageReader.how could I change the format of the picture by Qt?
Bookmarks