Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
93f8581b
Commit
93f8581b
authored
Jul 01, 2014
by
Ilya Lavrenov
Committed by
Alexander Alekhin
Jul 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnings
parent
effff27c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
cap_qtkit.mm
modules/highgui/src/cap_qtkit.mm
+10
-11
No files found.
modules/highgui/src/cap_qtkit.mm
View file @
93f8581b
...
...
@@ -448,13 +448,12 @@ double CvCaptureCAM::getProperty(int property_id){
QTFormatDescription* format = [[connections objectAtIndex:0] formatDescription];
NSSize s1 = [[format attributeForKey:QTFormatDescriptionVideoCleanApertureDisplaySizeAttribute] sizeValue];
int width=s1.width, height=s1.height;
switch (property_id) {
case CV_CAP_PROP_FRAME_WIDTH:
retval = width;
retval =
s1.
width;
break;
case CV_CAP_PROP_FRAME_HEIGHT:
retval = height;
retval =
s1.
height;
break;
default:
retval = 0;
...
...
@@ -1011,22 +1010,22 @@ bool CvVideoWriter_QT::writeFrame(const IplImage* image) {
cvCvtColor(image, argbimage, CV_BGR2BGRA);
unsigned char* imagedata = (unsigned char*)argbimage->imageData;
unsigned char* imagedata
_
= (unsigned char*)argbimage->imageData;
//BGRA --> ARGB
for (int j = 0; j < argbimage->height; j++) {
int rowstart = argbimage->widthStep * j;
for (int i = rowstart; i < rowstart+argbimage->widthStep; i+=4) {
unsigned char temp = imagedata[i];
imagedata[i] = 255;
imagedata[i+3] = temp;
temp = imagedata[i+2];
imagedata
[i+2] = imagedata
[i+1];
imagedata[i+1] = temp;
unsigned char temp = imagedata
_
[i];
imagedata
_
[i] = 255;
imagedata
_
[i+3] = temp;
temp = imagedata
_
[i+2];
imagedata
_[i+2] = imagedata_
[i+1];
imagedata
_
[i+1] = temp;
}
}
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&imagedata
NSBitmapImageRep* imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&imagedata
_
pixelsWide:movieSize.width
pixelsHigh:movieSize.height
bitsPerSample:8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment