Displaying an image and its metadata in C++ [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am learning Linux programming using C++. As a project I want to make program that would pop up a window and display the image (passed as arguments), with the meta data of the file.
I have looked up the OpenCV library, and I would like to build something similar but simpler, on my own. Basically I want to implement just this kind of functionality. How should I go about doing this?
For a start, I will be working only with .jpg files.

the popup window part can be happen by QT or SDL
or many other GUI framework and you should consider GTK too. simple image operation can be done by these too, but for more advance topics you can go for example to Imagemagick library
QT sample : http://doc.qt.io/archives/qt-4.8/qt-tutorials-widgets-toplevel-example.html
SDL sample : https://wiki.libsdl.org/SDL_CreateWindowAndRenderer
also reading metadata in qt can be done using QImage or QImageReader and methods like QImage::textKeys() or QImageReader::textKeys()

If you want to implement it from scratch, you must know a few things
Binary I/O (C++ provides that easily)
How Images are stored in computers, what's the difference between different formats like .jpeg and .png - how they encode and compress pixels ?
How to Draw anything on your screen ? there are many options Using a GUI toolkit canvas, X11 windowing system drawing abilities or even use something like OpenGL or DirectX.
Or just simply use any of the libraries mentioned by #nullqube

Qt framework could definitely make your project easier.
It would also allow you to easily display a file dialog window to let the user select the file, rather than passing it as an argument to the program.

Related

Implement video editor [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to implement a "simple" video editor and since I'm new to the topic, I'm not sure how to start.
The editor should have the following features / components
A timeline for multiple recordings
A video player that plays the edited video in real-time (it should render all added effects and assets)
Assets that can be placed on the timeline such as text elements, arrows and so on
I'd like to start with the video player and then build the other components around it.
Which frameworks would you recommend?
For the player, I'm not sure if DirectShow is the right choice or MediaFoundation would be better. Are there other libraries to consider? FFmpeg?
My recommendation given your interests is to start with Blender
http://www.blender.org
It's written in a combination of C, C++, and Python, has a substantial user community, and has the advantage of open source code so you can see how a real large project looks.
You might end up just contributing to it, or you might lift bits of it to bootstrap your own project, etc. But if you don't know about, it's worthwhile to look at if only to help you refine what you want to work on.

Creating 3D software C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a project to do where I'm asked to create my own little 3D software in C++.
I'm not sure where to start from, I thought I might go with OpenGL 3.3, which i need to study first, and make it all accessible through a GUI ?
Is it the right way to process ?
I've used 3D softwares like Blender, and all I want to do is something really basic :
buttons to create primitive object
move them
rotate them
scale them,
maybe a bit of texturing and lighting
You can check out this tutorial:
http://www.codeproject.com/Articles/20286/GLUI-Window-Template#_articleTop
or
You can look at mine I did for a school project.
https://github.com/sitting-duck/stuff/tree/master/School%20-%20Comp%20Sci/Computer%20Animation%20-%20Fall%202014/Assn1%20-%20Transformations/assn1%20redo/assn1
In this version I just use key bindings to initiate the transformations. Will be easier than making a GUI, so I did that first to learn how to get the transformation code all working,
when you open it it's going to complain that it's missing libraries (like freeglut.lib) because I didn't upload them to github. The reason I didn't upload them to github is because those libraries are going to keep being updated, so if I want to use this project I will just go redownload the latest versions.
You would have to go get those libraries and link them to your project. You would also have to make sure the glew library is installed on your computer, so it will be a little more complicated than just copying my code to get it running, but at least you can look at mine and try to get an idea of what's going on.
I used the GLUI library for user interfaces, all the buttons and stuff usually, it's been a while since I've used this and there are probably other libraries that are better but I found GLUI to be pretty easy, I've also heard of ANTTweakBar being used for GUI stuff,
I have another project with more user interface stuff, but I'll have to find it and go upload it,
hopefully I gave you enough hints to where you can get up and running, you can see in my code what libraries I am using and go to the library websites to learn how to install them, link them to the project etc.
Here's some keywords, glew, glut, freeglut, glui, ANTTweakbar go look up those things,
also, you won't need to use Blender to make a model for your program, OpenGL already has some primitives built in that you can use to test out your transforms on.
probably with your current state of knowledge you won't be able to run and compile my project and unfortunately I did not post any instructions on my github :( but an example I'm sure will help you and when I finish some other work today I will go post installation instructions on there.
I made this using VisualStudio 2013 on Windows 8.1. You may need to use older versions of the glew and glut libraries if you are using older version of VisualStudio,

Inputs Needed for making a Media Player [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to develop a music player using Qt, QML & CPP.
I'm new to this kind of development (related to multimedia).
I want some insights from you on how other Music Players work.
My first hurdle is how should I maintain the Library Info.? -- All the Metadata of each file, their locations etc.
I thought of having a Database. As I'm using Qt, It provides SQLite internally. So, I'm opting for creating a Database which contains all the metadata of each music file (.mp3)
Will this be feasible if we have lot of mp3 files. Say, 40K files. So, it comes to almost 40K records in a DB table. Then will this SQLite works well ? Are there any alternatives for maintaining the media library?
Hope I'm clear, I can elaborate if specified.
Thanks in Advance,
inblueswithu
Then will this SQLite works well ? Are there any alternatives for
maintaining the media library?
In short, yes, SQLite will work.
There are various media players like this this out there using SQLite for embedded systems, and they work fine for this requirement. The limits are documented on the official website.
If you plan to have a QtQML application, I would suggest using the QtSql module for handling the database, and QtMultimedia for the audio part. I would also recommend QtQuick controls for the UI part.
Here you can find the module documentations for those:
QtSql: https://qt-project.org/doc/qt-5.1/qtsql/qtsql-index.html
QtMultimedia: http://qt-project.org/doc/qt-5.1/qtmultimedia/qtmultimedia-index.html
QtQuick Controls: http://qt-project.org/doc/qt-5.1/qtquickcontrols/qtquickcontrols-index.html
Yes, SQLite can support 40k rows in a table. You can see http://www.sqlite.org/limits.html for more info about its limits.

Looking to develop my own small C++ browser that basically will display HTML, Javascript, and Flash, where to start? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm looking to start developing a browser (operating system isn't an issue, but preferring Linux or Windows). I'm just trying to figure out where to start. I know Visual Studio lets you drop a lightweight IE component into it, but I don't want IE's issues. I was hoping to start with a very basic mozilla build, but I cant seem to find one anywhere.
Does anyone know where I can find a good open source starting point OR how to start this on my own?
If you're not opposed to using Qt, then Qt's Webkit implementation could be a fairly clean start for cross-platform work:
http://doc.qt.nokia.com/4.7-snapshot/examples-webkit.html
Note in particular the "Fancy Browser" sample:
http://doc.qt.nokia.com/4.7-snapshot/webkit-fancybrowser.html
There are many customizations possible and ways of hooking the engine. There's also support for Flash, though I've not tried that:
http://www.qtcentre.org/threads/31547-Flash-support-for-QT-Webkit-4-6
Although you can use Qt with other compilers/IDEs, the quickest way to get started is with Qt Creator. After installing it there should only be a few clicks needed to get the QtWebkit examples building, on either Windows or Linux:
http://qt.nokia.com/products/developer-tools

Using Google Chromium's Views Project as an Application Framework in C++ [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have had contact with Google Chromium Code and that’s terrific for building applications with. The problem now lies that no-one has tried to use it outside Google Chromium Project. What I have in mind is to develop an open source project which may be used for this purpose. The fundamental goals would be:
Guarantee Linux-Windows support for the same code.
Take advantage of all resources available like thread control, stats, unit test…
Make it clearer how to use Skia for graphic effects and customizations.
Present a useful application doing the most of this.
Integrate C++ and JavaScript code using V8
Use Webkit for rendering html content
There’s a chance of it get off the paper. What do YOU think?
Claudio M. Souza Junior
Developer.
see https://github.com/lianliuwei/chromium_base
I create it for the same reason like you.
chromium is great project. It's code could be useful to using in other project. but It need time to extract it. I see one project to extract the ui part, but it change too many for noreason for example it change the .cc to .cpp. my project extract the base, ui, view part for the origin project, rm the ICU (it's so big) and gurl(you can add it quick) keep the gyp, gclient, grit-i18n, gtest, gmock... change the code little. and keep the extract history. I add a new type of messageloop for using it in the MFC(for company project :( ) now it can only work on Windows but it's no so hard to make it work on linux.(google do it all)
for use the browser in you project you can see the http://code.google.com/p/chromium/ for help.
It's great this project help you a litte. I at first think it's a no one care project.
I'm assuming you have looked at the extensively documented and developed QtWebkit and know why you don't want to use that?
I'm sure it will be easier to use V8 in a QtWebkit application than to somehow tear out Chromium's "View project".
Qt has the bonus that as long as you operate within the framework, everything will work on a lot of different platforms (more than Chomium now supports I think).