Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to save and load image in qt
Forum Updated to NodeBB v4.3 + New Features

How to save and load image in qt

Scheduled Pinned Locked Moved Unsolved General and Desktop
11 Posts 2 Posters 691 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    UG SEP
    wrote on 20 Jul 2021, 03:04 last edited by
    #1

    Hey,
    If we share.doc file with anyone then also we can see the image so can I know how to save an image in qt so it can be used by anyone i.e. those who don't have the image inside the file

    J 1 Reply Last reply 20 Jul 2021, 04:13
    0
    • U UG SEP
      20 Jul 2021, 03:04

      Hey,
      If we share.doc file with anyone then also we can see the image so can I know how to save an image in qt so it can be used by anyone i.e. those who don't have the image inside the file

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 20 Jul 2021, 04:13 last edited by
      #2

      @UG-SEP said in How to save and load image in qt:

      those who don't have the image inside the file

      What file? Can you please explain better what you want to do?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • U Offline
        U Offline
        UG SEP
        wrote on 20 Jul 2021, 11:18 last edited by
        #3

        Let think you are my friend and I want to send you a file of my own extension .hmt with the software and in that file, an image exists (The program open the image by its location) so if you open it then the image is not visible to you so can you tell me how can I assign an image in an object and then I save the object in a file and then read the object while writing the file...
        Hope you understand

        J 1 Reply Last reply 20 Jul 2021, 11:21
        0
        • U UG SEP
          20 Jul 2021, 11:18

          Let think you are my friend and I want to send you a file of my own extension .hmt with the software and in that file, an image exists (The program open the image by its location) so if you open it then the image is not visible to you so can you tell me how can I assign an image in an object and then I save the object in a file and then read the object while writing the file...
          Hope you understand

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 20 Jul 2021, 11:21 last edited by
          #4

          @UG-SEP said in How to save and load image in qt:

          so can you tell me how can I assign an image in an object

          I still don't understand what you mean. What object?
          Are you talking about HTML file + images?
          How does this "object" (whatever it is) access this image?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • U Offline
            U Offline
            UG SEP
            wrote on 21 Jul 2021, 11:26 last edited by
            #5

            Ok so,
            you have seen that whenever we send a .doc file in which some images are there so anyone can see that image if we send him the .doc file so how can I create so that if I also send my .hmt extension file to someone so he or she can see that image inside the file

            J 1 Reply Last reply 21 Jul 2021, 11:28
            0
            • U UG SEP
              21 Jul 2021, 11:26

              Ok so,
              you have seen that whenever we send a .doc file in which some images are there so anyone can see that image if we send him the .doc file so how can I create so that if I also send my .hmt extension file to someone so he or she can see that image inside the file

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 21 Jul 2021, 11:28 last edited by
              #6

              @UG-SEP said in How to save and load image in qt:

              .hmt extension file to someone so he or she can see that image inside the file

              It depends on the format of that htm file.
              What is this format? Is it your own format? Or something existing?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • U Offline
                U Offline
                UG SEP
                wrote on 21 Jul 2021, 11:28 last edited by
                #7

                @jsulm said in How to save and load image in qt:

                his format? I

                my own

                J 1 Reply Last reply 21 Jul 2021, 11:31
                0
                • U UG SEP
                  21 Jul 2021, 11:28

                  @jsulm said in How to save and load image in qt:

                  his format? I

                  my own

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 21 Jul 2021, 11:31 last edited by
                  #8

                  @UG-SEP Well, then you can decide how to include images. I have no idea how your format is defined. You did not even tell us whether it is text or binary format.
                  For example docx from Microsoft Word is a zip archive containing XML files and images (and what else is part of the document). The images are referenced in XML files then.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • U Offline
                    U Offline
                    UG SEP
                    wrote on 21 Jul 2021, 11:32 last edited by
                    #9

                    it's a text format

                    J 2 Replies Last reply 21 Jul 2021, 11:40
                    0
                    • U UG SEP
                      21 Jul 2021, 11:32

                      it's a text format

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 21 Jul 2021, 11:40 last edited by
                      #10

                      @UG-SEP Then you can simply put the image file next to htm file and send both together.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • U UG SEP
                        21 Jul 2021, 11:32

                        it's a text format

                        J Offline
                        J Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on 21 Jul 2021, 11:42 last edited by
                        #11

                        @UG-SEP An alternative would be to encode the image content as BASE64 and put this BASE64 string in your text file.
                        But I would not do this for bigger images.

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1

                        5/11

                        21 Jul 2021, 11:26

                        • Login

                        • Login or register to search.
                        5 out of 11
                        • First post
                          5/11
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved