XCF plugin with Gimp.app

Discussion in 'GIMP for Mac' started by Mortimer, Mar 18, 2008.

  1. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    Hello,

    I have comited a new version of the XCF Quick Look plugin that now relies on the Gimp.app gimp-console utility. For now, it relies on the Gimp.app bundle to be in your /Applications folder. Ideally, I would like it to figure out by himself where the bundle it.

    Usually, Quick Look plugin go in the application bundle Contents/Library/QuickLook folder, I will see how that works and adapt the code as needed. If it's inside the app bundle, it should be easier to figure out where the gimp-console executable is.

    Are you ok if we take this way instead of a standalone plugin?
     
  2. Auria

    Auria Member

    Joined:
    Mar 16, 2008
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Yes, that's fine, I guess it probably takes very little space.

    You'll just need to write on how to add it to the build instructions, as I can't do it on my Tiger computer :)
     
  3. theonehorst

    theonehorst Member

    Joined:
    Nov 29, 2007
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Home Page:
    Good idea. I will test this today :D
     
  4. theonehorst

    theonehorst Member

    Joined:
    Nov 29, 2007
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Home Page:
    I only get a black picture in quicklook. any debug i can do? gimp 2.4.5, ql-plugin inside the app, and 10.5.2
     
  5. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    Ok,

    I committed a version that should work bundled in Gimp.app, wherever the user places it. To build it, just check it out, go to the directory xcf_quicklook and run:
    <code>xcodebuild build</code>

    To bundle it in Gimp.app, just make a directory Library/QuickLook in the Contents folder of the bundle and put the file build/Release/xcf_quicklook.qlgenerator in it.

    @Auria, you are right, it's quite small, only 64Kb.

    @theonehorst:
    - did you remove the old plugin from /Library/QuickLook/ if you ever installed it there at some time?
    - you might need to touch Gimp.app and run it once for Leopard to use the plugin bundled in there
    - check Console.app output to see if it says anything special
    - there is a link_launch.sh script in the distribution, at the end is the gimp-console call generating the thumbnail, you can try it from the command line to see if that works.
    - is it with any pictures or only one?
     
  6. theonehorst

    theonehorst Member

    Joined:
    Nov 29, 2007
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Home Page:
    No it works. I had some bad stuff with gimp. it even won't open xcf with right click. i deleted all stuff and reinstall it. Now it works fine with the bundle quicklook. good work. do you think, it is stable for a release with the 2.4.5 gimp. then I will do a new build
     
  7. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    well, it works for me, with the files I have (I don't keep that many xcf files personally... so). It would be cool if more people could test it, We distribute just the plugin as beta, with instructions to install it IN the gimp.app bundle. What do you think of that?
     
  8. andreasw

    andreasw Member

    Joined:
    Mar 17, 2008
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    sounds good!
     
  9. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
  10. theonehorst

    theonehorst Member

    Joined:
    Nov 29, 2007
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Home Page:
    We could also just bundle it into the app. I don't think, that I will cause any trouble and it's easier for the user...
     
  11. andreasw

    andreasw Member

    Joined:
    Mar 17, 2008
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    That's pretty darn sweet. Works great! A bit slow though but I couldn't care less! Weehoo!&nbsp; :wilber:

    Did a worst case scenario .xcf, and it worked great =)
    What I did found out though, was that it doesn't work filenames that includes the letters å,ö and ö (and probably all the other non-english letters)
     
  12. theonehorst

    theonehorst Member

    Joined:
    Nov 29, 2007
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Home Page:
    Well these letters anyway should be found in any good filename :D
     
  13. andreasw

    andreasw Member

    Joined:
    Mar 17, 2008
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    I'm not sure I'm getting your point here... BTW namnlös.xcf is the standard filename for untitled files in the swedish version.
     
  14. andreasw

    andreasw Member

    Joined:
    Mar 17, 2008
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    "found" a new "bug". transparent backgrounds shows as white. sure, maybe transparent isn't supported but maybe we could at least change the color from white to let's say "preview-grey". About bundle it with the app, NO! All qlgenerators should lie under library/quicklook, it's easier for the user to manage the plugins that way.

    What we could do is to set up a library/quicklook-link in the gimp-diskimage. That way, people can simply drag the plugin into the folder the same way as they use the applicationsfolder to drag the gimp into it.

    Get it?&nbsp; :) It's late over here and I'm to tired to look for faults in the text... :p
     
  15. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    @andreas:
    - for the letters, I will check that, maybe it's just a missing escape somewhere
    - for the transparency, I decided to generate .jpg instead of .png as the thumbnail file size was smaller and it gave a very little speed improvement. Maybe it's not even worth it and I could just get .png
    - for the bundling: a) it's usual to bundle quicklook plugins IN the application they are supposed to display the file of. IMO it also seem easier for the user that does not have to go in the /Library folder... b) if it's not bundled in Gimp.app, there is no way to find out where Gimp.app is installed, and it forces the user to install Gimp.app at the root of /Applications (typical, but not always the case)
     
  16. andreasw

    andreasw Member

    Joined:
    Mar 17, 2008
    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    I think I've changed my mind. Since the quicklooklpugins depends on gimp.app it seems like a good idea to bundle it within the app.
    About the transparent: I think it's important to show transparency, no other ways to speed up to process?
     
  17. Auria

    Auria Member

    Joined:
    Mar 16, 2008
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    Mortimer, last time I tried it seemed to me like gimp-console was loading all plug-ins, etc. maybe there is a way to tell it that we don't need any plug-ins, and to not load them?

    Maybe take a look at those flags :

    --no-data
    --no-fonts

    there might be others...
     
  18. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    ok, I tried:
    no-fonts and no-data
    real 0m7.651s
    user 0m5.816s
    sys 0m1.714s

    no-fonts
    real 0m8.335s
    user 0m5.896s
    sys 0m1.792s

    normal
    real 0m8.110s
    user 0m5.888s
    sys 0m1.757s

    no-data:
    real 0m7.788s
    user 0m5.875s
    sys 0m1.715s

    Just tried one run each with the same image and output parameters. I wonder what happen if we don't load fonts and there is a text layer in the xcf... I will have to test, 7.6 against 8.1s is not a great gain, but it's still that. I am not sure what the timeout is for the thumbnail generation, will have to ask the quicklook mailling list.
     
  19. Auria

    Auria Member

    Joined:
    Mar 16, 2008
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
    AFAIK text layers in GIMP are bitmap, so there should be no problem

    We'd still need to find a way to not load plug-ins, if it's possible
     
  20. Mortimer

    Mortimer New Member

    Joined:
    Mar 17, 2008
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Home Page:
    ok, --no-data still loads the plugins :(
    do we need to bundle all the py plugins. I mean, we know that they are broken with the distribution for now.. (this is not the right solution, but just saying ;)
     

Share This Page