FAQ
Hello !
I want use python to change the "note" from .jpeg files .
What is the functions on PIL how make this ?
Thank you !

Search Discussions

  • Martin at Aug 13, 2009 at 11:38 pm

    On Aug 13, 1:55?pm, "catalinf... at gmail.com" wrote:
    Hello !
    I want use python to change the "note" from .jpeg files .
    What is the functions on PIL how make this ?
    Thank you !
    What do u mean by the note?
  • Nobody at Aug 14, 2009 at 4:52 am

    On Thu, 13 Aug 2009 16:38:07 -0700, Martin wrote:

    I want use python to change the "note" from .jpeg files .
    What is the functions on PIL how make this ?
    What do u mean by the note?
    I think he means the EXIF data.
  • Catafest at Aug 20, 2009 at 8:23 am
    On my photo jpg i have this :

    Image Type: jpeg (The JPEG image format)
    Width: 1224 pixels
    Height: 1632 pixels
    Camera Brand: Sony Ericsson
    Camera Model: W810i
    Date Taken: 2009:07:09 08:16:21
    Exposure Time: 1/19 sec.
    ISO Speed Rating: 320
    Flash Fired: Flash did not fire, compulsory flash mode.
    Metering Mode: Center-Weighted Average
    Software: R4EA031 prgCXC1250321_ORANGE_HN 4.5

    This is the data i want edit it to make some copyright for my site.

    From http Thu Aug 20 10:36:14 2009
    From: http (Paul Rubin)
    Date: 20 Aug 2009 01:36:14 -0700
    Subject: How to create functors?
    References: <a68be5ab-4fc2-44fc-8535-11d70f7086b9@h31g2000yqd.googlegroups.com>
    <7xab1vl0qf.fsf@ruckus.brouhaha.com>
    <pan.2009.08.20.04.11.33@REMOVE.THIS.cybersource.com.au>
    Message-ID: <7xmy5uanlt.fsf@ruckus.brouhaha.com>

    Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:
    As near as I can tell, a functor is just an object which is
    callable like a function without actually being implemented as a
    function, e.g.:
    No it's not anything like that either, at least as I'm used to the
    term in programming or in mathematics. Maybe it's used other ways
    though. As I'm used to it, it's a feature of certain static type
    systems. The notion isn't that useful in Python but you could
    translate it something like this: imagine that the "list" datatype has
    a couple extra operations:

    # lift_value turns a normal value from a base type to a 1-element list
    list.lift_value(x) = [x]

    # lift_function turns a function on a base type to a higher order
    # function that operates on a whole list
    list.lift_function(f) = partial(map, f)

    Then given a function like

    def square(x): return x*x

    you could say

    lifted_square = list.lifted_function(square)
    print lifted_square([1,2,3,4,5])

    and get [1,4,9,16,25]. Similarly if you had some other type (like a
    tree data structure), that type could also support a map-like
    operation so you could lift functions to it (lifting a function and
    applying it to a tree like [1,[2,3],4] would result in [1,[4,9],16] or
    whatever).

    If I remember properly, for type t to be a functor it needs the above
    two lifting operations, with the property that for a given function f,

    t.lifted_value(f(x)) = (t.lifted_function(f))(t.lifted_value(x))

    I guess this explanation isn't going that well but basically in a
    statically typed language you'd use functors to convert the signatures
    of functions to versions that operate on higher types. The idea comes
    from ML and is used explicitly in Haskell, and I think some of the C++
    standard template library can be explained in terms of functors.

    For the mathematical concept of functors and how they relate to
    programming (at least Haskell's version), see:

    http://en.wikibooks.org/Haskell/Category_theory
  • MaxTheMouse at Aug 20, 2009 at 11:01 am

    On Aug 20, 10:23?am, catafest wrote:
    On my photo jpg i have this :

    Image Type: jpeg (The JPEG image format)
    Width: 1224 pixels
    Height: 1632 pixels
    Camera Brand: Sony Ericsson
    Camera Model: W810i
    Date Taken: 2009:07:09 08:16:21
    Exposure Time: 1/19 sec.
    ISO Speed Rating: 320
    Flash Fired: Flash did not fire, compulsory flash mode.
    Metering Mode: Center-Weighted Average
    Software: R4EA031 ? ? prgCXC1250321_ORANGE_HN 4.5

    This is the data i want edit it to make some copyright for my site.
    I don't know about PIL but you might want to try exif.py.
    http://sourceforge.net/projects/exif-py/
  • Catafest at Aug 21, 2009 at 8:09 am
    I don't extract data from jpegs.
    I wanna put some data in this (copyright of my site) ...
    On Aug 20, 2:01?pm, MaxTheMouse wrote:
    On Aug 20, 10:23?am, catafest wrote:

    On my photo jpg i have this :
    Image Type: jpeg (The JPEG image format)
    Width: 1224 pixels
    Height: 1632 pixels
    Camera Brand: Sony Ericsson
    Camera Model: W810i
    Date Taken: 2009:07:09 08:16:21
    Exposure Time: 1/19 sec.
    ISO Speed Rating: 320
    Flash Fired: Flash did not fire, compulsory flash mode.
    Metering Mode: Center-Weighted Average
    Software: R4EA031 ? ? prgCXC1250321_ORANGE_HN 4.5
    This is the data i want edit it to make some copyright for my site.
    I don't know about PIL but you might want to try exif.py.http://sourceforge.net/projects/exif-py/
  • Michele Petrazzo at Aug 21, 2009 at 5:14 pm

    catafest wrote:
    I don't extract data from jpegs. I wanna put some data in this
    (copyright of my site) ...
    My wrap for freeimage, called freeimagepy :) can't, as now, wrote exif
    information on the image, but since freeimage can do it, I think that
    it's not so difficult to add this type of feature.
    If you have some time for investigate and create a patch, I'll be happy
    to include it into the mainline!

    Contact me directly if you want to talk of need some help on how do it.

    Michele
  • Catafest at Aug 22, 2009 at 1:14 pm
    If I make it work, i will send the solution. Thank you !

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedAug 13, '09 at 12:55p
activeAug 22, '09 at 1:14p
posts8
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase