开发者

want to load an image, process it and save it back in file?

开发者 https://www.devze.com 2023-03-06 08:12 出处:网络
I am creating a photo editor app in webos using its hybrid app. I am new to c++. I don\'t want to display image on the开发者_如何转开发 screen using C++, because on the front end I am using javascri

I am creating a photo editor app in webos using its hybrid app. I am new to c++.

I don't want to display image on the开发者_如何转开发 screen using C++, because on the front end I am using javascript as ui.because javascript UI is better thn PDK... But on the backend I have to use c++ just to process it and save image to the file. I can't save it using javascript because webOS doesn't have support for canvas.toDataURL() method.

So I have to pick an image file from a relative path in the local directory, get its rgb values, process on the rgb values and then saving image back to the directory. Saving as new and replacing the previous.

Ok, now I want assistance from u developers. Also if this is all possibe using the SDL library ?? Also can I crop image in c+|+ as well given x,y coordinates of all of its edges to be cropped from?


I don't know the SDL library well (I suppose it can load and save images) but for loading and saving images you can use the OpenIL/DevIL library, it is quite simple and supports many formats. You could also take a look at OpenCV, but that could be a bit heavy-weight for your purpose. To your second question, You can do everything with the image when it's loaded, just program it. With the right libraries and programmer, C++ can do nearly everything. Sorry for this stupid sentence, but you asked if you can do that in C++ and the answer is nearly always Yes.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号