.jpeg? .jpg? .png?

On Fri, Apr 3, 2015 at 11:42 AM, Paul Vint <pjv...@gmail.com> wrote:

> Looking for thoughts on how to host drumkit images on server so they can
> be fetched by the import dialog....
>
> The way I (temporarily) set it up in my code is to have the image
> reference by filename in the drumkit_list xml file like:
> <image>drums.jpeg</image>
> And then on my testing server I just made an images/ directory that those
> image files are placed in.
>
> This is bad because it assumes that different kits have image files with
> different names, so it must be done differently.
>
> The images are packed in the h2drumkit file with all the other files,
> example:
> TestKit.h2drumkit
> \_drumkit.xml
> \_sample.wav
> \_drums.jpeg
>
> One idea I had for the server that hosts the drumkit list was just to have
> an images/ subdirectory where images for the kits are stored using the
> drumkit's name as the image filename.
> Example, if the drumkit file is TestKit.h2drumkit, in the images/
> subdirectory there will be an image file called TestKit.jpeg
> This would prevent file collisions, and be easy to write a script to
> output (and rename) the images from the kits when creating the drumkit list
> xml file.
>
> Clear as mud?
> Any thoughts?
>
> Thx
> Paul
>
> On Wed, Apr 1, 2015 at 9:51 PM, Paul Vint <pjv...@gmail.com> wrote:
>
>> Good to hear. :)
>>
>> I ripped the pic from wikipedia... been thinking I need to add "image
>> license" to the xml and the display, as most pics we'll find are CC-BY-SA
>> or similar, so it would be prudent to show the attribution. (PS: If anyone
>> has pics of any kits they could contribute they'd be useful!)
>>
>> No, I hadn't actually updated the drumkits to match yet..  I think if I
>> add an <imageLicence> tag to the xml and have it display we're pretty set
>> on the xml format... should be able to do that in the morning, as well as
>> at least get one kit updated so we can properly test the whole routine.
>>
>> Also, I was thinking about updating the kits to the current format and I
>> think the easiest way would be to do it by adding the functionality to
>> h2cli to update old kits (maybe a hidden option?) - making an update option
>> in the cli would be pretty easy and be "self-updating" in the future as it
>> would use the drumkit class etc. Thoughts?
>>
>> Another "also": I did a test with a "new style" kit with the new image
>> tag and the hihat tags in it with version 0.9.5 today and it worked fine.
>>
>> Cheers
>> Paul
>>
>> On Wed, Apr 1, 2015 at 9:40 AM, Thijs van severen <
>> thijsvanseve...@gmail.com> wrote:
>>
>>> oooohh yeah !!
>>> i looove the deathmetal pic  :-D
>>>
>>> the 'preview' is working now, i can install the drumkit (i tried the
>>> deathmetal and yamaha kit)
>>> but when i right click the drumkit (in the sound library window) and
>>> click properties i dont see a pic
>>> maybe the pic is not yet in the h2drumkit file or the code to display it
>>> is not yet in place ?
>>>
>>> great work Paul !
>>>
>>> grtz
>>> Thijs
>>>
>>> 2015-04-01 15:16 GMT+02:00 Paul Vint <pjv...@gmail.com>:
>>>
>>>> Hi Thijs - try now!
>>>>
>>>> The Yamaha kit wasn't working for you because you ended up with a 0
>>>> byte file for the image in the cache... I fixed it so that it'll now clear
>>>> when you update the list (my git fork is updated)   Also, added a real
>>>> image for DeathMetal and Boss DR-110
>>>>
>>>> Thanks
>>>> Paul
>>>>
>>>>
>>>> On Wed, Apr 1, 2015 at 3:00 AM, Thijs van severen <
>>>> thijsvanseve...@gmail.com> wrote:
>>>>
>>>>> Hi Paul !
>>>>>
>>>>> i can see the error message for the deathmetal kit, but still no
>>>>> images for the yamaha or 808
>>>>>
>>>>> this is the debug output :
>>>>>
>>>>>
>>>>> selecting your server and hitting 'update list' :
>>>>> (I) SoundLibraryImportDialog::SoundLibraryImportDialog INIT
>>>>> (I) Download::Download Downloading '
>>>>> http://dotslash.ca/h2/drumkit_list.xml'
>>>>> (I) Download::__fetch_done Download completed.
>>>>>
>>>>> clicking the yamaha kit :
>>>>> (I) SoundLibraryImportDialog::soundLibraryItemChanged Loaded image
>>>>> Bass_drum.jpg from cache
>>>>> (/home/tvanseve/.hydrogen/data/cache/repositories/images/Bass_drum.jpg)
>>>>>
>>>>> clicking the 808 kit (there are a number of 808-ish kits in the list,
>>>>> i tried all of them, but nu luck)
>>>>> (I) SoundLibraryImportDialog::soundLibraryItemChanged No image for
>>>>> this kit specified in drumkit.xml on remote server
>>>>>
>>>>> clicking the deathmetal kit :
>>>>> (I) SoundLibraryImportDialog::soundLibraryItemChanged Loading image
>>>>> ZZZZZZZ.png from remote server
>>>>> (W) SoundLibraryImportDialog::loadImage Error fetching image from
>>>>> remote server (HTTP 404)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> grtz
>>>>> Thijs
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2015-04-01 0:34 GMT+02:00 Paul Vint <pjv...@gmail.com>:
>>>>>
>>>>>> I added a check to make sure the file was found on the server (and if
>>>>>> not you just get no image but it will log some info about what error was
>>>>>> found).
>>>>>>
>>>>>> Turns out I forgot to add read permissions on that image file when I
>>>>>> uploaded it, but it's a good thing since it made me see I should add some
>>>>>> extra checks and logging.
>>>>>>
>>>>>> If you try it now you should get an image for the 808 and for the
>>>>>> Yamaha, and for testing I added a bogus image to the DeathMetal kit's xml
>>>>>> (so it should try to get an image and fail)
>>>>>>
>>>>>> On Tue, Mar 31, 2015 at 11:48 AM, Paul Vint <pjv...@gmail.com> wrote:
>>>>>>
>>>>>>> Ooops - I have changed the image in the xml but not put that image
>>>>>>> on the server.
>>>>>>>
>>>>>>> I'm adding some better error checking... I'll let you know when it's
>>>>>>> updated.
>>>>>>>
>>>>>>> Thanks for the feedback and the good info
>>>>>>>
>>>>>>> Paul
>>>>>>>
>>>>>>> On Tue, Mar 31, 2015 at 6:37 AM, Thijs van severen <
>>>>>>> thijsvanseve...@gmail.com> wrote:
>>>>>>>
>>>>>>>> hi Paul
>>>>>>>>
>>>>>>>> i just did a build clean ("./build.sh c") and make ("./build.sh m")
>>>>>>>> and now the error is gone  :-)
>>>>>>>>
>>>>>>>> however, when i point to your drum repo, update the list and select
>>>>>>>> the yamaha drumkit i dont get a picture  :-(
>>>>>>>>
>>>>>>>> ./hydrogen -v   >  0.9.7-'7aeaa63'
>>>>>>>>
>>>>>>>>
>>>>>>>> if i run in debug mode i see this in the terminal output when i
>>>>>>>> select your repo, update list, and select the yamaha kit :
>>>>>>>>
>>>>>>>> (I) Download::Download Downloading '
>>>>>>>> http://dotslash.ca/h2/drumkit_list.xml'
>>>>>>>> (I) Download::__fetch_done Download completed.
>>>>>>>> (I) SoundLibraryImportDialog::soundLibraryItemChanged Loaded image
>>>>>>>> Bass_drum.jpg from cache
>>>>>>>>
>>>>>>>> but i dont see the picture
>>>>>>>>
>>>>>>>>
>>>>>>>> grtz
>>>>>>>> Thijs
>>>>>>>>
>>>>>>>>
>>>>>>>> 2015-03-29 18:35 GMT+02:00 Paul Vint <pjv...@gmail.com>:
>>>>>>>>
>>>>>>>>> Judging by your message in the "instrument layer" regarding using
>>>>>>>>> hydrogen from my fork you got past this? Had it just not pulled in 
>>>>>>>>> the new
>>>>>>>>> FileDownloader files?
>>>>>>>>>
>>>>>>>>> Paul
>>>>>>>>>
>>>>>>>>> On Sun, Mar 29, 2015 at 5:46 AM, Thijs van severen <
>>>>>>>>> thijsvanseve...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Paul
>>>>>>>>>>
>>>>>>>>>> i just did a git pull + ./build.sh m
>>>>>>>>>> but i got this error :
>>>>>>>>>>
>>>>>>>>>> [ 21%] Built target h2synth
>>>>>>>>>> Linking CXX executable hydrogen
>>>>>>>>>> CMakeFiles/hydrogen.dir/src/SoundLibrary/SoundLibraryImportDialog.cpp.o:
>>>>>>>>>> In function `SoundLibraryImportDialog::loadImage()':
>>>>>>>>>> /home/tvanseve/Git/Hydrogen/pvint/hydrogen/src/gui/src/SoundLibrary/SoundLibraryImportDialog.cpp:408:
>>>>>>>>>> undefined reference to `FileDownloader::downloadedData() const'
>>>>>>>>>> CMakeFiles/hydrogen.dir/src/SoundLibrary/SoundLibraryImportDialog.cpp.o:
>>>>>>>>>> In function
>>>>>>>>>> `SoundLibraryImportDialog::soundLibraryItemChanged(QTreeWidgetItem*,
>>>>>>>>>> QTreeWidgetItem*)':
>>>>>>>>>> /home/tvanseve/Git/Hydrogen/pvint/hydrogen/src/gui/src/SoundLibrary/SoundLibraryImportDialog.cpp:516:
>>>>>>>>>> undefined reference to `FileDownloader::FileDownloader(QUrl, 
>>>>>>>>>> QObject*)'
>>>>>>>>>> collect2: ld returned 1 exit status
>>>>>>>>>> make[2]: *** [src/gui/hydrogen] Error 1
>>>>>>>>>> make[1]: *** [src/gui/CMakeFiles/hydrogen.dir/all] Error 2
>>>>>>>>>> make: *** [all] Error 2
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> grtz
>>>>>>>>>> Thijs
>>>>>>>>>>
>>>>>>>>>> 2015-03-29 3:37 GMT+02:00 Paul Vint <pjv...@gmail.com>:
>>>>>>>>>>
>>>>>>>>>>> I have this functionally finished and can be tested using my
>>>>>>>>>>> fork at https://github.com/pvint/hydrogen
>>>>>>>>>>>
>>>>>>>>>>> To test fetching the images from a remote server in the Import
>>>>>>>>>>> Library dialog you can set the server to
>>>>>>>>>>> http://dotslash.ca/h2/drumkit_list.xml where I have added an
>>>>>>>>>>> image to the YamahaVintage and the TR808 kits.
>>>>>>>>>>>
>>>>>>>>>>> I have it all set up as follows:
>>>>>>>>>>> - in the drumkit.xml file there's an <image> tag that holds the
>>>>>>>>>>> filename of the image
>>>>>>>>>>> - the image file is put into the .h2drumkit file with the samples
>>>>>>>>>>> - the image is also in a subdirectory "images/" on the
>>>>>>>>>>> repository server so users get images of kits when browsing in the 
>>>>>>>>>>> Import
>>>>>>>>>>> dialog
>>>>>>>>>>> - remote images are cached in the data/cache directory
>>>>>>>>>>> - In the properties and Save Library dialogs the image can be
>>>>>>>>>>> selected by clicking a browse button
>>>>>>>>>>> - images are automatically scaled down to fit the dialogs (but
>>>>>>>>>>> it doesn't enlarge them if they are smaller)
>>>>>>>>>>>
>>>>>>>>>>> Potential problems:
>>>>>>>>>>> - the way I have it set now different kits with different images
>>>>>>>>>>> with the same name will cause a collision in the cache directory... 
>>>>>>>>>>> perhaps
>>>>>>>>>>> we should just use the MD5 hash with a .png or .jpeg extension to 
>>>>>>>>>>> avoid
>>>>>>>>>>> this?
>>>>>>>>>>> - same problem exists the way I have it set to store images on
>>>>>>>>>>> the server for browsing the kits in the Import dialog
>>>>>>>>>>>
>>>>>>>>>>> Screenshot attached.
>>>>>>>>>>>
>>>>>>>>>>> Any testing and/or comments appreciated!
>>>>>>>>>>>
>>>>>>>>>>> Cheers
>>>>>>>>>>> Paul
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>>> Dive into the World of Parallel Programming The Go Parallel
>>>>>>>>>>> Website, sponsored
>>>>>>>>>>> by Intel and developed in partnership with Slashdot Media, is
>>>>>>>>>>> your hub for all
>>>>>>>>>>> things parallel software development, from weekly thought
>>>>>>>>>>> leadership blogs to
>>>>>>>>>>> news, videos, case studies, tutorials and more. Take a look and
>>>>>>>>>>> join the
>>>>>>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Hydrogen-devel mailing list
>>>>>>>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> follow me on my Audio & Linux blog <
>>>>>>>>>> http://audio-and-linux.blogspot.com/> !
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>>> Dive into the World of Parallel Programming The Go Parallel
>>>>>>>>>> Website, sponsored
>>>>>>>>>> by Intel and developed in partnership with Slashdot Media, is
>>>>>>>>>> your hub for all
>>>>>>>>>> things parallel software development, from weekly thought
>>>>>>>>>> leadership blogs to
>>>>>>>>>> news, videos, case studies, tutorials and more. Take a look and
>>>>>>>>>> join the
>>>>>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Hydrogen-devel mailing list
>>>>>>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>>> Dive into the World of Parallel Programming The Go Parallel
>>>>>>>>> Website, sponsored
>>>>>>>>> by Intel and developed in partnership with Slashdot Media, is your
>>>>>>>>> hub for all
>>>>>>>>> things parallel software development, from weekly thought
>>>>>>>>> leadership blogs to
>>>>>>>>> news, videos, case studies, tutorials and more. Take a look and
>>>>>>>>> join the
>>>>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>>>>> _______________________________________________
>>>>>>>>> Hydrogen-devel mailing list
>>>>>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> follow me on my Audio & Linux blog <
>>>>>>>> http://audio-and-linux.blogspot.com/> !
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------------
>>>>>>>> Dive into the World of Parallel Programming The Go Parallel
>>>>>>>> Website, sponsored
>>>>>>>> by Intel and developed in partnership with Slashdot Media, is your
>>>>>>>> hub for all
>>>>>>>> things parallel software development, from weekly thought
>>>>>>>> leadership blogs to
>>>>>>>> news, videos, case studies, tutorials and more. Take a look and
>>>>>>>> join the
>>>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>>>> _______________________________________________
>>>>>>>> Hydrogen-devel mailing list
>>>>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>>>> sponsored
>>>>>> by Intel and developed in partnership with Slashdot Media, is your
>>>>>> hub for all
>>>>>> things parallel software development, from weekly thought leadership
>>>>>> blogs to
>>>>>> news, videos, case studies, tutorials and more. Take a look and join
>>>>>> the
>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>> _______________________________________________
>>>>>> Hydrogen-devel mailing list
>>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> follow me on my Audio & Linux blog <
>>>>> http://audio-and-linux.blogspot.com/> !
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>>> sponsored
>>>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>>>> for all
>>>>> things parallel software development, from weekly thought leadership
>>>>> blogs to
>>>>> news, videos, case studies, tutorials and more. Take a look and join
>>>>> the
>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>> _______________________________________________
>>>>> Hydrogen-devel mailing list
>>>>> Hydrogen-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>>> sponsored
>>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>>> for all
>>>> things parallel software development, from weekly thought leadership
>>>> blogs to
>>>> news, videos, case studies, tutorials and more. Take a look and join the
>>>> conversation now. http://goparallel.sourceforge.net/
>>>> _______________________________________________
>>>> Hydrogen-devel mailing list
>>>> Hydrogen-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>>
>>>>
>>>
>>>
>>> --
>>> follow me on my Audio & Linux blog <http://audio-and-linux.blogspot.com/>
>>> !
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>> sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>> for all
>>> things parallel software development, from weekly thought leadership
>>> blogs to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Hydrogen-devel mailing list
>>> Hydrogen-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>>>
>>>
>>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Hydrogen-devel mailing list
> Hydrogen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hydrogen-devel
>
>


-- 
Jeff Sepeta
574-699-3749
jsep...@gmail.com
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Hydrogen-devel mailing list
Hydrogen-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel

Reply via email to