Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-21 Thread James Platt
I was there and, as I remember it, there was a presentation on something else where this was mentioned. IIRC, the topic was Language Oriented Programming and there was a discussion about how much complexity is okay when you are programmatically generating DSL code. The presenter mentioned

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-13 Thread David Storrs
On Wed, May 12, 2021 at 9:21 PM Ben Greenman wrote: > On 5/12/21, Robert Haisfield wrote: > > Daniel, that's awesome. How would I filter down this list according to > the > > regex? > > > > (define list-of-files (map path->string (directory-list starting-path))) > > You can wrap it in a filter:

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-12 Thread kamist...@gmail.com
p.s: scale-to-fit might be interesting for you and if you don't care about extra options (for background/alpha etc.) you can construct the pict with (bitmap path) directly instead of (bitmap (make-object bitmap% ...)) p.p.s: I think there was also a way to convert/use images within picts or the

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-12 Thread Ben Greenman
On 5/12/21, Robert Haisfield wrote: > Daniel, that's awesome. How would I filter down this list according to the > regex? > > (define list-of-files (map path->string (directory-list starting-path))) You can wrap it in a filter: (define list-of-files (filter (lambda (str) (regexp-match?

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-12 Thread Robert Haisfield
Daniel, that's awesome. How would I filter down this list according to the regex? (define list-of-files (map path->string (directory-list starting-path))) On Tuesday, May 11, 2021 at 6:57:03 PM UTC-6 daniel@gmail.com wrote: > Hi Robert > > > > Even better if I could point the function at a

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-12 Thread kamist...@gmail.com
Personally I use pict and racket/draw instead of htdp/image, because save-image is png only. Pict to transform or load the image, racket/draw's bitmap% to save and/or load the image (sidenote: in general I find pict more pleasant to work with, but that may be subjective): (require pict

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-12 Thread Robert Haisfield
Dan, that's awesome. Thank you. Martin, I would love some way to extract the image metadata from each of the files outputted by Dan's function. All my function does is take the current width and height and apply some math to return some new values, so right now I'm just manually going into

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Daniel Prager
Hi Robert > Even better if I could point the function at a directory, it finds all of the images in it, and creates the data structure for me. Any ideas? You can get the files in a directory using *directory-list *and filter for the image files using a regex. (for ([f (directory-list

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Robert Haisfield
More specifically, I'm trying to do what I talk about here. Can I do this in Racket? https://twitter.com/RobertHaisfield/status/1392272268022095872 On Tuesday, May 11, 2021 at 4:42:43 PM UTC-6 Robert Haisfield wrote: > Okay, so I figured out how to do what I want on individual photos using >

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Jens Axel Søgaard
Hi Robert, There are some bindings for Magick in the example folder for the FFI library. https://github.com/racket/racket/tree/master/pkgs/racket-doc/ffi/examples The bindings are in magic.rkt and examples of use are in use-magick.rkt (see the bottom). /Jens Axel Den tir. 11. maj 2021 kl.

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread 'John Clements' via Racket Users
Racket has the ability to read a variety of different image files. I would go first to 2htdp/image’s “bitmap/file” to read images. “save-image” can write images (but only as png files). I believe there are also an array of lower-level image manipulation functions that are likely to have a less

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Robert Haisfield
Alternatively, does the normal images function for Racket work? When I was looking through the documentation I saw a lot about creating shapes but not about using image files. On Tuesday, May 11, 2021 at 2:03:33 PM UTC-6 Robert Haisfield wrote: > Hmm does the video language work for image

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Robert Haisfield
Hmm does the video language work for image files? If so, then I think it might work. On Tuesday, May 11, 2021 at 9:03:35 AM UTC-6 Sage Gerard wrote: > I hope that has what Robert is looking for, but I don't recognize that > speech. In fact, I have a false memory, because I'm not finding the

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Sage Gerard
I hope that has what Robert is looking for, but I don't recognize that speech. In fact, I have a false memory, because I'm not finding the speech I'm looking for on https://con.racket-lang.org/2018/#speakers On 5/11/21 10:19 AM, Bruce O'Neel wrote: > This might be it. > > [(seventh RacketCon):

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Bruce O'Neel
This might be it. > I don't know of one off hand, but I believe RacketCon 2018 (?) included a > presenter that showed a PostScript-like DSL for designers and artists.  If > pict not cover your needs, maybe dig into the presentations? > Failing that, can you show what

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Sage Gerard
I don't know of one off hand, but I believe RacketCon 2018 (?) included a presenter that showed a PostScript-like DSL for designers and artists. If pict not cover your needs, maybe dig into the presentations? Failing that, can you show what you'd hope the syntax would look like? That would

[racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Robert Haisfield
I have to do a bunch of .jpg and .png image resizings and was looking for a programmatic way to do it. Is their a Racket DSL for this? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails