@simspace wrote:
Hi all,
I am new to openFrameworks and I am trying to get the ofxTimeline addon to compile with openFrameworks 9 using Xcode on OSX Sierra.
The build of
ofxTLImageSequence.cppis failing inofxTLImageSequence::recomputePreview()method.This is not the actual code, but psuedo code of what is causing the error:
ofTexture->loadData( ofImage.getPixels(), …)It seems that
ofImage.getPixels()is not returning whatofTexture.loadData()requires and is causing the build error below.Does any one have any ideas how to fix this?
Thanks,
ChrisThe build errors:
Projects/openframeworks9/addons/ofxTimeline/src/ofxTLImageSequence.cpp:236:14: No matching member function for call to 'loadData' Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:474:7: Candidate function not viable: no known conversion from 'ofPixels_<unsigned char>' to 'const unsigned char *const' for 1st argument Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:482:7: Candidate function not viable: no known conversion from 'ofPixels_<unsigned char>' to 'const unsigned short *' for 1st argument Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:490:7: Candidate function not viable: no known conversion from 'ofPixels_<unsigned char>' to 'const float *' for 1st argument Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:549:7: Candidate function not viable: requires 3 arguments, but 4 were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:955:10: Candidate function not viable: requires 5 arguments, but 4 were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:520:7: Candidate function not viable: requires 2 arguments, but 4 were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:527:7: Candidate function not viable: requires 2 arguments, but 4 were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:534:7: Candidate function not viable: requires 2 arguments, but 4 were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:494:7: Candidate function not viable: requires single argument 'pix', but 4 arguments were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:502:7: Candidate function not viable: requires single argument 'pix', but 4 arguments were provided Projects/openframeworks9/libs/openFrameworks/gl/ofTexture.h:510:7: Candidate function not viable: requires single argument 'pix', but 4 arguments were providedThe ofxTLImageSequence::recomputePreview() method:
void ofxTLImageSequence::recomputePreview(){ if(!loaded){ ofLogError("ofxTLImageSequence -- hasn't been loaded"); return; } if(bounds.height < 20){ ofLogError("ofxTLImageSequence -- too squished at height " + ofToString(20)); return; } float widthPerFrame = bounds.height/imageHeight * imageWidth; int framesToShow = (bounds.width / widthPerFrame) + 1; if(framesToShow == 0){ ofLogError("ofxTLImageSequence -- no frames to show!"); return; } int startIndex = getIndexAtPercent(zoomBounds.min); int endIndex = getIndexAtPercent(zoomBounds.max); int framesInRange = (endIndex - startIndex); int frameStep = framesInRange / framesToShow; int fameIndex = 0; clearPreviewTextures(); for(int i = 0; i < framesToShow; i++){ ofImage* thumbnail = frames[startIndex+frameStep*i]->getThumbnail(); PreviewTexture p; p.frameIndex = startIndex+frameStep*i; p.texture = new ofTexture(); p.texture->allocate(thumbnail->getWidth(), thumbnail->getHeight(), ofGetGlInternalFormat(thumbnail->getPixelsRef())); // *** BUILD IS FAILING HERE *** // p.texture->loadData(thumbnail->getPixels(), thumbnail->getWidth(), thumbnail->getHeight(), ofGetGlInternalFormat(thumbnail->getPixelsRef())); p.bounds = ofRectangle(widthPerFrame*i, 0, widthPerFrame, bounds.height); previewTextures.push_back( p ); } }
Posts: 17
Participants: 3