Quantcast
Browsing all 40 articles
Browse latest View live

Answer by koan for Image Processing How to Apply gradient [-1 | 0 | 1 ] to...

From your code; you are trying to calculate gradient from RGB but there is nothing to indicate how RGB is stored in your image. A complete guess is that in your image you have BGRBGRBGR...etc.In that...

View Article


Answer by koan for makefile with OS dependent compiler

If you are compiling on MacOS X and Linux then you can put the following in your makefile:UNAME := $(shell uname)ifeq ($(UNAME), Darwin)CFLAGS = -Ofastendififeq ($(UNAME), Linux)CFLAGS = -O3endif# etc

View Article


Read uncompressed AVI using libavcodec

I am trying to read an uncompressed AVI file - basic uncompressed AVI are BGR bitmaps.if(frame.format == AV_PIX_FMT_BGR24){ int data_size = frame.linesize[0]*frame.height; my_data_ptr = new uint8_t...

View Article

Answer by koan for Read uncompressed AVI using libavcodec

The negative line size indicates that the frame is inverted (raw AVI are coded this way).The data pointer points to the top line and if you add the negative linesize to the pointer you get to the next...

View Article

Answer by koan for Can't load Font Awesome from subdirectory

It looks like this is a known issue, due to "same origin" security policy, see https://bugzilla.mozilla.org/show_bug.cgi?id=760436The reason why the site works after loading the higher level page is...

View Article


Sign a Framework for OSX 10.9

After using macdeployqt I sign my application to avoid Gatekeeper problems.I can use codesign on all the frameworks and everything inside the bundle but when I come to sign the bundle I get an error:$...

View Article

Qt Stylesheet for QMessageBox

I am using stylesheets. I want to set style information for the main message text and the informative text for a QMessageBox. Is it possible to access these sub-controls ?

View Article

Menu delay for QToolBar

I have a menu on a QToolBar by making a QAction and adding a QMenu to it. How can I remove the delay before the menu appears when you click on the icon ?QToolBar *myToolBar = new QToolBar(this);QAction...

View Article


Can't load Font Awesome from subdirectory

I have the following file layout:/website/index.html/website/font-awesome/css/website/font-awesome/fonts/website/Subdirectory/page1.htmlThe page /website/index.html does not use Font Awesome at all;...

View Article


Answer by koan for Qt on Mac -- how to access "search" in help menu

If you add a Help menu to your application, Qt will automatically add the search box. See http://doc.qt.io/qt-4.8/mac-differences.html#menu-bar

View Article

XPC service array crashes

I'm using the C interface for XPC services; incidentally my XPC service runs very nicely asides from the following problem.The other day I tried to send a "large" array via XPC; of the order of 200,000...

View Article

Answer by koan for Get the correct graphical representation of Thai...

As you have discovered in the comments to your question, it does not make sense to render a combining character or NSM without at least a consonant in the current character cell.Therefore you cannot...

View Article

Answer by koan for Right justify string containing Thai characters

It looks like the rjust() function will not work for you and you will need to count the number of cells in the string yourself. You can then insert the number of spaces required before the string to...

View Article


Answer by koan for Splitting Thai text by characters

For clarification of the previous answers, the issue you have is that the missing characters are "combining characters" - vowels and diacritics that must be combined with other characters in order to...

View Article

How to overwrite file locked by QuickLook

On OSX, some applications can overwrite files that QuickLook is keeping a lock on.For example, open a Finder window and select a video file; then process a video with Handbrake and overwrite the same...

View Article


Change scrollbar colours

I want to change the scrollbar colours for my Mac application. Specifically, I want to change the background colour.My application is Qt based so the application will already be created and running. I...

View Article

Answer by koan for What is "energy" in image processing?

There is more than one definition of "energy" in image processing, so it depends on the context of where it was used.Energy is used to describe a measure of "information" when formulating an operation...

View Article


Get number of frames in a video via AVFoundation

I'm trying to find the number of frames in a video I've just opened, without decoding all the frames.I open with AVAsset and then get an AVAssetTrack for the video. What next ?

View Article

Answer by koan for How does one obtain image buffers in their original format...

Like you I expected that setting an outputSettings of nil would result in output of native format video frames but this is not the case, you must specify something in order to get a valid...

View Article

Answer by koan for How to open a particular file with my QT application on...

You need to set up your Information Property List file (Info.plist) in your application bundle to identify files that can be opened by your app. See...

View Article
Browsing all 40 articles
Browse latest View live