Qt Framework includes a class called QBuffer that can be used to access a QByteArray (internal QByteArray to be precise) as if it is a file. So you can use Stream readers and writers to access data in it similar to a QFile.
Continue reading “How to Create and Use Buffers in Qt”Fix ModSecurity Issues in Qt Network Module Download Functionality
You might have come across the following (Not Acceptable) error when trying to download files from some websites using Qt. This error message is generated by ModSecurity and it usually means that for some reason the web server does not allow downloading of the file using the method you are trying. In my case it was because of the User-Agent Header set to a value not allowed by the server. So here is how I fixed it:
Continue reading “Fix ModSecurity Issues in Qt Network Module Download Functionality”How to Create an Empty QImage to Play Around With
You can create a QPixmap and convert it to QImage if you just want to have a QImage for modification and manipulation. Here, you can use the following code to achieve this:
int width = 100;
int height = 200;
QImage image = QPixmap(width, height).toImage();
How to Fix Facebook Share No Thumbnail/Description Issue
Sometimes when you share a URL in Facebook you notice that there is no description or thumbnail image in the shared link. This happens mostly because there is no image and/or description in the URL you are trying to share. In order to find out what is missing from the URL’s contents that causes this issue, you can use Facebook’s Sharing Debugger Tool.
Continue reading “How to Fix Facebook Share No Thumbnail/Description Issue”How to Watermark Your Canon RAW Pictures
To be able to watermark your RAW (CR2 and CRW) files taken using a Canon EOS camera you first need to convert them to JPG, and then add your watermark (for example your website address or your name) to them. In this post I am going to describe how to do it for free.
How to handle Canon EOS RAW images in C++/Qt
RAW, or to put it in terms of file extension, CR2 and CRW files are the images produced using Canon EOS cameras. A RAW photo, as it appears from it’s name, is the raw format of the image, meaning it contains the exact binary data that was recorded by a specific camera when the photo was taken.
Continue reading “How to handle Canon EOS RAW images in C++/Qt”First official release for RAW Converter
RAW Converter is a free application written for Windows 7 and later. It allows you to convert RAW (*.CR2 and *.CRW) images shot using your Canon EOS camera to Jpeg or Tiff. You can access RAW Converter using Downloads page from the top menu or by clicking on its icon below:
Continue reading “First official release for RAW Converter”How to Change Hue Level of an Image in Qt
Qt offers convenient classes for basic image processing and pixel manipulation. In this article I am going to describe how you can change the hue level of a whole image using QImage class in Qt.
Continue reading “How to Change Hue Level of an Image in Qt”How to Build OpenCV 2.4.13 Static/Dynamic with MSVC2010
OpenCV 2.4.13 was released just a few days ago and as a tradition I had to check if a static build with Microsoft Visual C++ 2010 (MSVC2010) 32-bit produced any errors or not. Fortunately, everything went quite smoothly (except a few common warnings here and there) and I was able to successfully build it so if you need to build the latest OpenCV release statically using MSVC2010 you can follow the steps below:
Continue reading “How to Build OpenCV 2.4.13 Static/Dynamic with MSVC2010”
How to Reduce Your SQLite Database File Size Using Qt
Below is what I do for clearing and compressing my SQLite database files in Qt. Usually when you delete some entries from a SQLite database, it does not get deleted physically but instead it just gets marked as deleted and is not retrieved in queries. The good thing about this is that it works fast. But the obvious downside is the fact that the free space is not released. To release the space occupied by deleted files you need to do the following:
Continue reading “How to Reduce Your SQLite Database File Size Using Qt”