How to create a 16x16 icon from a .png file?
Hi! A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ Now it does not. How can I import .png files in Pharo? Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Look at IconFactory http://smalltalkhub.com/#!/~peteruhnak/IconFactory On Tue, Dec 22, 2015 at 2:11 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Ah yes! Thanks! Alexandre
On Dec 22, 2015, at 12:01 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Look at IconFactory http://smalltalkhub.com/#!/~peteruhnak/IconFactory
On Tue, Dec 22, 2015 at 2:11 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Peter, I have updated the help based on your icon factory. Your code is very easy to use, and it is available from the catalog. Pretty cool! https://pharo.fogbugz.com/f/cases/17291/The-ImportingResourceHelp-has-to-be-... The monkey will go over it soon I guess. In case you wish to improve it, it would be great to have a resize function :-) Cheers, Alexandre
On Dec 22, 2015, at 12:01 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Look at IconFactory http://smalltalkhub.com/#!/~peteruhnak/IconFactory
On Tue, Dec 22, 2015 at 2:11 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
please note that its not required to covnert a png to a method source if you use git because git can handle versioning binary files just fine. All you have to do is access your local github-cache and retrieve the image from there (assuming the image has been added to your github repository).
From there one is just a matter of using Form fromFileNamed: aStringPathToYourPNG
if you dont use git, use Peter's IconFactory. On Tue, Dec 22, 2015 at 3:12 PM Alexandre Bergel <alexandre.bergel@me.com> wrote:
Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Exactly!
On Dec 22, 2015, at 4:46 PM, Dimitris Chloupis <kilon.alios@gmail.com> wrote:
please note that its not required to covnert a png to a method source if you use git because git can handle versioning binary files just fine. All you have to do is access your local github-cache and retrieve the image from there (assuming the image has been added to your github repository).
From there one is just a matter of using Form fromFileNamed: aStringPathToYourPNG
if you dont use git, use Peter's IconFactory.
On Tue, Dec 22, 2015 at 3:12 PM Alexandre Bergel <alexandre.bergel@me.com> wrote: Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Look for users of ReadWriterPNG ReadWriterPNG formFromStream: (Filesystem workingDirectory / 'blb.png) Works Le 22/12/15 14:11, Alexandre Bergel a écrit :
Hi!
A couple of month ago the following expression was working: ThemeIcons new createIconMethodsFromFile: 'cube' directory: '/Users/alexandrebergel/Desktop/cubeâ
Now it does not. How can I import .png files in Pharo?
Cheers, Alexandre
participants (4)
-
Alexandre Bergel -
Dimitris Chloupis -
Peter Uhnák -
stepharo