Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. image
    Log in to post

    • UNSOLVED Custom image linear gauge possible?
      QML and Qt Quick • qml image linear gauge rpm • • failedcomp  

      1
      0
      Votes
      1
      Posts
      20
      Views

      No one has replied

    • UNSOLVED QImage to byte array doesn't work
      General and Desktop • image qimage bytearray epd esp8266 • • Gh0stShell  

      5
      0
      Votes
      5
      Posts
      74
      Views

      QImage::save() doesn't get the raw bytes of the image, it converts the image to a file format. If you really want the raw bytes, do something like QByteArray ba((const char *)preview.constBits(), preview.byteCount());
    • UNSOLVED Latlong position over any world map image using at charts
      General and Desktop • qt5 image charts qtchart • • vicky_mac  

      3
      0
      Votes
      3
      Posts
      66
      Views

      @Kent-Dorfman thanx for reply. Actually I saw few java script programs for pointing accurate pixel values on image by using Mercator projection and it's formula. I checked it works fine in Java script. But in qt I want to display whole lat long trace so wanted to plot chart with image as it's background. But not able to correctly det the background image as per chart x and y axis values.
    • UNSOLVED Modify the qsvg plugin to support animation with AnimatedImage - Possible?
      QML and Qt Quick • plugin image animation svg qt quick 2.0 • • jeanmilost  

      1
      1
      Votes
      1
      Posts
      58
      Views

      No one has replied

    • UNSOLVED HTML - SVG images inserted in a text document show ugly
      QML and Qt Quick • image text html svg stretch • • jeanmilost  

      5
      0
      Votes
      5
      Posts
      135
      Views

      Is it possible to to extend QLabel and implement my own paintEvent() that draws the text and draws the svg image? It seems to work, but would problaby take alot of effort to get it right (i.e. to get the image in the right location everytime). void MypLabel::paintEvent(QPaintEvent* event) { QPainter painter(this); const auto pos = QPoint(0, 16); painter.drawText(pos, this->text()); const auto posPixMap = QPoint(30, 0); auto size = QSize(16, 16); auto pixMap = QIcon(":/Resources/smiley.svg").pixmap(size); painter.drawPixmap(posPixMap, pixMap); }
    • UNSOLVED Qt Quick Controls 2 - How to grab the items contained in a TableView in images in order to print them?
      QML and Qt Quick • image qtquick2 printing grab printtopdf • • jeanmilost  

      1
      0
      Votes
      1
      Posts
      46
      Views

      No one has replied

    • UNSOLVED zooming an SVG image
      QML and Qt Quick • qml image memory zoom scale • • Marc_Van_Daele  

      1
      0
      Votes
      1
      Posts
      86
      Views

      No one has replied

    • UNSOLVED Enter different images
      General and Desktop • image image display qgraphics entrylist • • Omar Medhat  

      8
      0
      Votes
      8
      Posts
      68
      Views

      @Omar-Medhat Show your current void MainWindow::on_openImage_clicked() implementation. The previous one was wrong as @SGaist pointed out...
    • SOLVED Help optimize (or properly load) multiple images into a QListWidget (out of memory issue)
      General and Desktop • image qlistwidget image display out of memory thumbnail • • Electrolite  

      4
      0
      Votes
      4
      Posts
      294
      Views

      @mrjj I see, thank you. I'm going for that route then
    • UNSOLVED using resources system with qml
      QML and Qt Quick • qml qt5 image resource interface • • newbiSoso  

      8
      0
      Votes
      8
      Posts
      229
      Views

      Hi @newbisoso , See this, it may help you
    • SOLVED Problem loading an image with QImage
      General and Desktop • error image qimage path qopengltexture • • JesusM  

      5
      0
      Votes
      5
      Posts
      777
      Views

      @KillerSmath That solved my problem. Thanks!
    • UNSOLVED Gamma correction for display
      General and Desktop • pyside2 image • • krzysieklfc  

      2
      0
      Votes
      2
      Posts
      513
      Views

      @krzysieklfc said in Gamma correction for display: Shouldn't Qt somehow handle the color correction when I'm 'telling it' to view the image? no! why should it? I don't quite understand why you are dividing by 256? Also whats the returning type of GetR()/GetG()/GetB()?
    • UNSOLVED Is there a simple way to use pinch to zoom an image at the center of the pinch gesture?
      QML and Qt Quick • qml image zoom pincharea pinch • • larkei15  

      3
      1
      Votes
      3
      Posts
      1578
      Views

      @stcorp I'll have to look at that later, but I didn't know about the resizeContent method from Flickable. From waht I'm seeing in your code and in the documentation, this looks like a good solution. Thanks!
    • UNSOLVED Rendering error after changing the size of Window
      QML and Qt Quick • image window • • wangfys  

      4
      0
      Votes
      4
      Posts
      565
      Views

      @wangfys I got exactly the same behavior as you. Although I never used the scene graph before, your example (+ the doc and the Custom Geometry example in Qt's examples) gave me a little crash course in the topic. http://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html Your example really should work as it seems you did everything as required by the doc. At my side, the lines become visible once I hover the mouse one the exit button. Possibly this is a bug? PS. Again, not being useful, I maybe I could suggest you to change the definition of your points from QVariantList points; to QVector<QPointF> points; Then you can use: const float x = static_cast<float>(points[i].x()); const float y = static_cast<float>(points[i].y()); vertices[i].set(x, y); rather than vertices[i].set(points[i].toPointF().x(), points[i].toPointF().y()); as it saves you a couple of calls to toPointF().
    • UNSOLVED Smoothed icons with high dpi support in Qt app
      General and Desktop • image scaling high dpi qt 5.11 • • daljit97  

      2
      0
      Votes
      2
      Posts
      1568
      Views

      Hi, Did you already saw the related part of QIcon’s documentation ?
    • SOLVED Resize image to fit in graphics view
      General and Desktop • qtcreator qt5.5 image images listwidget • • Kinesis  

      9
      0
      Votes
      9
      Posts
      4122
      Views

      @Devopia53 It works! , Thanks.
    • UNSOLVED Image, loading *.pkm file(ETC1) issue
      QML and Qt Quick • image pkmfile etc1compression • • divdiv  

      1
      0
      Votes
      1
      Posts
      469
      Views

      No one has replied

    • SOLVED macOS Image Gallery deploy
      QML and Qt Quick • qml qtquick image osx macosx • • shav  

      2
      0
      Votes
      2
      Posts
      428
      Views

      Hi everyone! I've solved this problem. In my case the problem was in asynchronous load images into another thread. When I changed asynchronous method to the synchronous all work fine.
    • UNSOLVED Exif Meta info for JPG and PNG
      General and Desktop • c++ image png jpg exif • • shav  

      2
      0
      Votes
      2
      Posts
      770
      Views

      Hi, AFAIK, PNG doesn't contain the same meta data so you won't be able to use QExifImageHader to read them.
    • SOLVED Resize image with mouse QTextEdit
      General and Desktop • image resize qtextedit mouse • • HenrikSt.  

      10
      0
      Votes
      10
      Posts
      3327
      Views

      @mrjj I don't want to resize it via a dialog. I need to do that with the mouse (manually)
    • UNSOLVED Compare two images for similarity
      General and Desktop • image image processin • • sush  

      6
      0
      Votes
      6
      Posts
      1339
      Views

      @sush this is actually outside of the scope of Qt. You should use a graphics processing library (like OpenCV - i don't know if it offers such functionality) to do such stuff. Or you need to implement an appropriate algorithmn yourself which uses the Qt API to access the pixel data. This is by far a complicated topic. You may want to read the following links: Overview Perceptual Image Diff lib QGoImageComapre
    • SOLVED Image viewer - moving to previous image in directory
      General and Desktop • image qstringlist directory • • Avec  

      13
      0
      Votes
      13
      Posts
      3989
      Views

      @Avec Oh duh.. I should have thought of that as a potential reason. I just assumed that you were in the directory with the files as your current dir. Glad it's all solved. :)
    • UNSOLVED Handle ArrayBuffer received via WebSocket's binaryMessageReceived() with QML
      QML and Qt Quick • qml image websocket binary • • danyright  

      3
      0
      Votes
      3
      Posts
      1343
      Views

      Thanks for the link ! I haven't yet been able to get it working. But I suspect I should probably be using a Loader with a Canvas component, instead of a simple Image element. I'll test it out and let you know. If anyone has a working code, don't hesitate to share ^^ I'm sure it would be a great example to include in the docs. Daniel
    • UNSOLVED Display /provide QImage or pixel map in WebEngine view (from C++ to HTML).
      QtWebEngine • javascript image imageprovider hybrid qtwebegine • • zupazt3  

      2
      0
      Votes
      2
      Posts
      1189
      Views

      Well one way to do it is to use QWebEnginePage::runJavaScript but be careful it executes asynchronously! http://doc.qt.io/qt-5/qtwebenginewidgets-qtwebkitportingguide.html then in your javascript - find IMG element by id/class/whatever and set its contents like an embedded image e.g. change src to src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==' this is example 1x1 pixel black dot image you'll have to substitute with your own image data base64 encoded and of course change image format if you're not using png to data:image/jpg(whatever)
    • UNSOLVED Save Image of QGraphicview in SqlServer
      General and Desktop • qt 5.4 image sqlserver saving • • M4RZB4Ni  

      11
      0
      Votes
      11
      Posts
      2671
      Views

      @M4RZB4Ni yes, the big question is if they are on same lan/network. :)
    • UNSOLVED OpenGL Image Load/Store using Qt 5.7?
      General and Desktop • qt5 opengl image qt5.7 shader • • otah007  

      1
      0
      Votes
      1
      Posts
      686
      Views

      No one has replied

    • SOLVED HowTo position scaled Image Top/Left in Flickable in Page
      QML and Qt Quick • image qtquickcontrols positioning • • ekkescorner  

      3
      0
      Votes
      3
      Posts
      1339
      Views

      cool :) now the image is always correct positioned and visible while zoom-in/out or fit-into-screen QtCon2016 - Room Info to Session
    • UNSOLVED Clip QML Types with Context2D
      QML and Qt Quick • image canvas context qml types • • Mark81  

      4
      0
      Votes
      4
      Posts
      2355
      Views

      Out of curiosity, I implemented a QQuickPaintedItem-based PathMask type. The result looks like this: The code is: pathmask.h #ifndef PATHMASK_H #define PATHMASK_H #include <QObject> #include <QQuickItem> #include <QQuickPaintedItem> #include <QPainter> #include <QPainterPath> class PathMask : public QQuickPaintedItem { Q_OBJECT public: explicit PathMask(QQuickItem *parent = Q_NULLPTR); ~PathMask(); virtual void paint(QPainter *painter); Q_INVOKABLE void beginPath(); Q_INVOKABLE void moveTo(qreal x, qreal y); Q_INVOKABLE void lineTo(qreal x, qreal y); Q_INVOKABLE void closePath(); private: QPainterPath *m_path{Q_NULLPTR}; }; #endif // PATHMASK_H pathmask.cpp #include "pathmask.h" #include <QPainterPath> #include <QtMath> PathMask::PathMask(QQuickItem *parent) : QQuickPaintedItem(parent) { } PathMask::~PathMask() { delete m_path; } void PathMask::paint(QPainter *painter) { if (m_path) { painter->setRenderHint(QPainter::Antialiasing); painter->setBrush( QBrush(QColor("black")) ); painter->drawPath( *m_path ); } } void PathMask::beginPath() { delete m_path; m_path = new QPainterPath; update(); } void PathMask::moveTo(qreal x, qreal y) { Q_ASSERT(m_path); m_path->moveTo(x,y); } void PathMask::lineTo(qreal x, qreal y) { Q_ASSERT(m_path); m_path->lineTo(x, y); } void PathMask::closePath() { Q_ASSERT(m_path); m_path->closeSubpath(); update(); } main.qml import QtQuick 2.5 import QtQuick.Controls 2.0 import QtQuick.Controls.Material 2.0 import QtGraphicalEffects 1.0 import io.qt.forum 1.0 ApplicationWindow { title: "PathMask Demo" visible: true width: 400 height: 400 color: "black" Image { id: src anchors.fill: parent visible: false source: "file:///home/patrick/Downloads/f22.jpg" } PathMask { id: mask anchors.fill: parent visible: false } Component.onCompleted: { mask.beginPath() mask.moveTo(360, 200); var Pi = 3.141592653589793238463; for (var i = 1; i < 5; ++i) { mask.lineTo(200 + 160 * Math.cos(0.8 * i * Pi), 200 + 160 * Math.sin(0.8 * i * Pi)); } mask.closePath(); } OpacityMask { anchors.fill: src source: src maskSource: mask } }
    • SOLVED QML Image zoom screenshot
      QML and Qt Quick • qt 5.7 image screenshot • • eiriham  

      2
      0
      Votes
      2
      Posts
      1670
      Views

      Got it to work. Only had to do this: @ //Screenshot button RectangularButton{ id: screenshotButton text: "Screenshot" anchors.bottom: parent.bottom anchors.right: savePictureButton.left anchors.margins: 10 onClicked: { //Take screenshot of the image flick.grabToImage(function(result) { snapController.url = result.url }, Qt.size(snapshotViewItem.width,snapshotViewItem.height)); //Update zoom and update image to save flick.contentHeight = flick.height flick.contentWidth = flick.width } } @
    • SOLVED Save Image to Android device
      Mobile and Embedded • android qt 5.7 image save qurl • • eiriham  

      24
      0
      Votes
      24
      Posts
      9664
      Views

      @Qojote Thank you and congratulations for giving all the details for solving this old and apparently common problem! Without the smallest details, this kind of things are never solved.
    • UNSOLVED Need help optimizing the design of an image editor program
      General and Desktop • image qimage qlabel qpixmap image processin • • Wings  

      2
      0
      Votes
      2
      Posts
      1074
      Views

      Hi, QPainter can draw a QImage. So you can for example create a new Widget, subclass for QLabel for example if you want and reimplement paintEvent. Like this you work all the time with your QImage without creating another one. And better you can only update the region that changed, no need to refresh everything. I did not try it but it should work. Sincerely
    • SOLVED Some image not display on deploy app but display running by Qtcreator
      General and Desktop • image • • helenebro  

      6
      0
      Votes
      6
      Posts
      1130
      Views

      I have found the problem. I have added on build folder libeay32.dll and ssleay32.dll but not on deploy folder
    • SOLVED how to create an image button
      General and Desktop • image qt 5.4.1 button • • M4RZB4Ni  

      7
      0
      Votes
      7
      Posts
      15146
      Views

      @mrjj Thanks so Much Bro :)
    • UNSOLVED Warp transformation library
      General and Desktop • image warp • • pbdot  

      2
      0
      Votes
      2
      Posts
      1477
      Views

      Hello, I don't know of any but it should be quite straightforward to implement. Basically you map coordinates from one space to another based on a parametric transformation (a matrix) and then interpolate where the pixels are closer/farther from one another. This should be helpful as an introduction. Another thing (and I'd say a proffered method) is if you can find an external library and interface Qt with it. Kind regards.
    • UNSOLVED Display multiple images in one QGraphicsView using QScrollBar
      General and Desktop • qgraphicsview image image display qscrollbar • • Donn  

      1
      0
      Votes
      1
      Posts
      741
      Views

      No one has replied

    • UNSOLVED Google Sphere Images
      General and Desktop • image google api sphere • • patrikd  

      1
      0
      Votes
      1
      Posts
      505
      Views

      No one has replied

    • SOLVED Select pixel values from a displayed image
      General and Desktop • image display point selection • • Donn  

      4
      0
      Votes
      4
      Posts
      1867
      Views

      well using MouseMoveEvent you can see where mouse is all the time and you can then use Image.pixel(x,y) to read pixel values. So yes its possible.