Ask Your Question

djtommye's profile - activity

2020-07-27 20:23:53 -0600 received badge  Popular Question (source)
2018-05-23 08:22:49 -0600 asked a question Restrict window resize or notifications

Restrict window resize or notifications I'm creating a thumbnail image and would prefer that the user not be able to clo

2018-05-23 08:18:44 -0600 received badge  Enthusiast
2018-05-22 23:13:46 -0600 commented question Multiple windows - destroyWindow hangs

Thank you, berak. That fixed it. I posted a custom message to the parent process to display the image and everything i

2018-05-21 23:12:03 -0600 asked a question Multiple windows - destroyWindow hangs

Multiple windows - destroyWindow hangs I have a MFC C++ slideshow program that I've written, which uses a thread to disp

2018-01-20 15:08:11 -0600 commented question image doesn't display

Hmm - but that blocks the thread. This is like a slideshow, so I'd like to display an image in the window, then some sec

2018-01-20 11:55:21 -0600 asked a question image doesn't display

image doesn't display I've got an app that I'm developing in Windows using MFC. When I display an image directory from

2017-05-26 10:11:58 -0600 asked a question Slide Show project - image smaller than window

First off - this is my first venture into image processing, and I'm so glad that I found cv!

I'm developing something of a slide show program, and have gotten cv to display an image and that image size properly based on the secondary display.

I'm curious though, about the best method to tackle my next problem... If the image is smaller has a different aspect ratio than the screen, I'd like it to be displayed with the correct ratio, but on a black background.

I'm wondering if I'm overlooking some simple method of doing this? Or will I need to dynamically create an image with the black background and then copy the loaded image to that.

Any help or sample code would be appreciated. Thanks in advance!

2017-05-25 21:54:16 -0600 asked a question imread and CString

Okay - I feel really stupid asking this question. But I've fought for this for two days now...

I'm writing in Visual Studio, C++. I'm passing an LPSTR to a function and, in that function, referencing the LPSTR to open a file. But it fails. If I hard-code a value, it succeeds. I'm getting all kinds of typecast warnings. I coded for 12 years but have been out of the business for 16 - so I'm getting back up to speed. Any help would be greatly appreciated!

BOOL CImageDialog::DisplayImage(LPCTSTR pszImageFilePath)
    Mat im = imread(pszImageFilePath);

    if (! {
        return FALSE;


no suitable constructor exists to convert from "LPCTSTR" to "std::basic_string<char, std::char_traits<char>, std::allocator<char>>"
cv::Mat cv::imread(const std::string &,int)': cannot convert argument 1 from 'LPCTSTR' to 'const std::string &'

I've tried passing other types, but they all cause issues. Thank you in advance!