Skip to content

Support JPEG BLOBs #579

Closed
Closed

Description

@TWiStErRob

What is required to support JPEG in BLOB typed columns?

I see there's PNG and BMP, both huge files especially if you store stuff in DB (=you have many rows), what's the reason for no JPEG yet?

The JPEG encoder/decoder at http://www.ijg.org/ works nicely, I just integrated it myself in Java JNI few weeks ago.

Activity

  1. justinclift commented on Apr 27, 2016

    @justinclift
    Member

    @MKleusberg Thoughts?

  2. MKleusberg commented on Apr 30, 2016

    @MKleusberg
    Member

    We're supporting whatever image formats are supported by Qt. Qt does support JPEG and on my (Linux) system DB4S therefore supports JPEG, too. However, the Qt developers have moved most images formats out of their library and into plugins. So for our Windows release, we'd need to distribute these plugins, too (or at least the JPEG one, that is). I hope this makes sense 😀 So in effect, this is a distribution issue, not a code issue. Could be that the JPEG plugin is linked into the nightly builds, too; so that might be worth giving a try as well.

  3. justinclift commented on Apr 30, 2016

    @justinclift
    Member

    Ahhh, that's interesting.

    @TWiStErRob Which OS are you using? 😄

  4. TWiStErRob commented on Apr 30, 2016

    @TWiStErRob
    Author

    Windows 7 SP1 x64, and I can confirm that the nightly build handles the JPEG BLOBs and the latest release doesn't.

    Nightly: 3.8.99 QT 4.8.7 SQLite 3.12.0
    Latest: 3.8.0 QT 5.5.1 SQLite 3.9.2

  5. MKleusberg commented on Apr 30, 2016

    @MKleusberg
    Member

    @justinclift This might also be interesting for your instructions for compiling on Windows. It'd be nice to have an extra directory called 'imageformats' inside the app dir. In this directory you have to copy some or all of the DLLs in ...\Qt Directory\Qt Version\plugins\imageformats.

  6. TWiStErRob commented on Apr 30, 2016

    @TWiStErRob
    Author

    Looking at the extensions list in the import dialog:
    3.8.0:
    image
    3.8.99:
    image

  7. justinclift commented on Apr 30, 2016

    @justinclift
    Member

    @MKleusberg Doesn't sound like it'll be a problem. I'll just need to understand better what needs to be added, and where. 😄

    Is this something extra we need to add/tick/enable for the Qt installation step (Qt install step in development here):

        https://github.com/justinclift/sqlitebrowser/wiki/Win64-setup-—-Step-7-—-Install-Qt

    Or is it more of something to do prior/post compiling of DB4S?

        https://github.com/justinclift/sqlitebrowser/wiki/Win64-setup-—-Step-13-—-Compile-DB4S-using-MSVC

    @TWiStErRob As a thought, if you're interested in compiling DB4S on Windows, it'd be super useful having someone go through those instructions and test them out for Win 7. I'm writing them up using Win 8.1, so I've been assuming they'll work on Win 7 the same. But it would be good to have someone actually check, to make sure. 😉

    Note, I'm still going through those docs (right now, working on Step 8), replacing/fixing screenshots, tweaking wording, etc. So, feel free to point out or ask things as needed.

  8. justinclift commented on Apr 30, 2016

    @justinclift
    Member

    @MKleusberg Hmmm, reading over your comment again... it's more something we need to add to the packaging step isn't it? If so, we can probably add it into the NSIS package script, so it works "out of the box" for everyone.

  9. TWiStErRob commented on Apr 30, 2016

    @TWiStErRob
    Author

    Holy-moly I thought this was the full docs for that :) Sorry, but I don't have time right now, and I'm planning to update to Windows 10 soon, so you're probably better off setting up a VM.

  10. justinclift commented on Apr 30, 2016

    @justinclift
    Member

    Sure, no worries at all. 😉

    (and yeah, it turns out to be a fairly involved process) 😧

  11. justinclift commented on Aug 18, 2016

    @justinclift
    Member

    Hmmm, if the solution to fixing it is as easy as shown in the answer here, we can probably do this for 3.9.0:

        https://stackoverflow.com/questions/6724606/include-the-jpeg-plugin-in-my-application

  12. 7 remaining items

  13. justinclift commented on Nov 7, 2017

    @justinclift
    Member

    Just investigated this for OSX. It turns out that on OSX we already bundle the required image format plugins, as we're using the Qt provided macdeployqt tool. That automatically includes all of the image format plugins.

    This is what's included with our 3.10.1 release:
    screen shot 2017-11-07 at 19 05 18

    Note that it's including the DDS, TIFF, and WEBP formats which we're skipping on Windows at the moment.

    I guess the question is should we start including the TIFF and WEBP ones now (in Windows)?

  14. MKleusberg commented on Nov 11, 2017

    @MKleusberg
    Member

    Hmm, maybe not include them and add them if somebody asks for them? But I guess nobody will really use them, especially inside databases.

    Does JPEG work on OS X then? Or are they just bundled but not loaded?

  15. TWiStErRob commented on Nov 15, 2017

    @TWiStErRob
    Author

    for anyone that wants to test right away

    hint 😉, hint 😉; sorry I didn't have any computer time recently

    maybe not include them and add them if somebody asks for them? But I guess nobody will really use them, especially inside databases.

    I would probably be using WebP if my Android target allowed it, but my minimum supported level is too low as of now. Note: Did you think anyone would use JPEG?

  16. MKleusberg commented on Nov 17, 2017

    @MKleusberg
    Member

    Fair enough 😉 WEBP might be useful for somebody 😄 No idea about the licence thing though.

    @justinclift Is it working on OS X? Or do we need to add some extra code, too?

  17. justinclift commented on Nov 17, 2017

    @justinclift
    Member

    Haven't actually tested the WEBP extension, as I just assumed it would be working. The JPEG one definitely does. 😄

    We don't need to write any extra code. Instead, we just need to add text to the About dialog mentioning the two projects (TIFF, WEBP) and a link to them. I think that'll satisfy their licence requirements.

    For OSX I still need to update our build script to delete the DDS extension during the process. We really don't want to ship things with security holes. 😄

    Hmmm... it might be better to update our OSX Qt build to use Qt 5.9.2 instead. I don't think there's any strong reason for us to keep with 5.7 on that platform, unlike Windows where we need it for XP compatibility.

    This is probably something I'll get done tonight. 😄

  18. justinclift commented on Nov 17, 2017

    @justinclift
    Member

    Just updated the OSX build box to use Qt 5.9.2, and ran the nightly build script to make sure it works. That fixes the DDS extensions security problem.

    Next steps:

    • Add the license info and links for TIFF & WebP to the About dialog
    • Update the Windows build to include the TIFF and WebP plugins
  19. justinclift commented on Nov 17, 2017

    @justinclift
    Member

    Tried adjusting the About dialog to include the TIFF and WebP license info, but it was just way too much text and didn't feel like the right approach.

    Instead of that, we now have a new "LICENSE-PLUGINS" text file in the top directory with the plugin license info in it and a brief description of what it's for. That should satisfy their license requirements and also not be confusing for people. 😄

  20. justinclift commented on Nov 17, 2017

    @justinclift
    Member

    Ahhh, just realised that new license info text file will need to be bundled with the OSX and Windows installs too. I'll look into that tomorrow.

  21. MKleusberg commented on Nov 17, 2017

    @MKleusberg
    Member

    Cool, that sounds like progress 😃

    Glad it's working on OS X. I was afraid we need to add some more code to point the plugin loader to the app dir or something.

  22. justinclift commented on Nov 17, 2017

    @justinclift
    Member

    Just updated the CMake build file to include the TIFF and WebP formats on Windows. Tomorrow I'll look into updating that to include the new plugin license file too. Same will need to be done on OSX. Shouldn't be too hard for either. 😄

  23. justinclift commented on Nov 18, 2017

    @justinclift
    Member

    The OSX builds now include both the LICENSE and LICENSE-PLUGINS text files in the .dmg (rebuilt todays nightlies, just to make 100% sure).

    Windows ones next. That'll be a CMake change... might put it off until tomorrow though. 😄

  24. justinclift commented on Nov 19, 2017

    @justinclift
    Member

    Just updated the CMake build file for Windows, so the LICENSE and LICENSE-PLUGINS files are now installed in the DB4S directory (under "licenses") along with the rest of our file set. They're also removed when uninstalling too (checked, just to be sure).

    In theory, I think that's everything that needs to be done for this issue. If someone has time to check the nightly builds from tomorrow onwards on Win32/64 and verify JPEG is working + the license files are included in the install dir, that would be great. 😄

    @TWiStErRob @chrisjlocke @karim Would any of you have time to check that? 😄

  25. justinclift commented on Dec 9, 2017

    @justinclift
    Member

    Closing this as the image support is definitely now working in OSX and Windows, which is "good enough". 😄

  26. self-assigned this
    on Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions