Skip to content

Can't load .jpg images when using ofxKinectV2 #42

Description

@kaua-melo

Thank you very much for the addon, Theo!

I came across the following issue. I can't open a .jpg image if I have ofxKinectV2 in the addons.make file. Loading .png works fine.

addons.make

ofxKinectV2 <- Remove this to be able to load .jpg

ofApp.h

#include "ofxKinectV2.h" //  comment this to be able to load .jpg
...
    ofImage bImg;

ofApp.cpp

...
void ofApp::draw()
{
    if (bImg.isAllocated())
    {
        bImg.draw(0, 0);
    }
}
...
void ofApp::dragEvent(ofDragInfo dragInfo)
{
    bImg.load(dragInfo.files[dragInfo.files.size() - 1]);
    cout << "Path: " << dragInfo.files[dragInfo.files.size() - 1] << endl;
    cout << "Dimensions: " << bImg.getWidth() << "x" << bImg.getHeight() << endl;
}

When I run the code above and drag a .jpg onto the canvas, I get the following on the terminal:

[ error ] ofImage: loadImage(): couldn't load image from ""/Users/kaua/Desktop/asd.jpg""
Path: /Users/kaua/Desktop/asd.jpg
Dimensions: 0x0

I'm using of_v0.10.1_osx_release on macOS 10.14.4.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions