Alpha Video Training
Results 1 to 5 of 5

Thread: photo rotating

  1. #1
    Member
    Real Name
    Duane Pederson
    Join Date
    Apr 2000
    Location
    Medicine Hat, AB
    Posts
    363

    Default photo rotating

    Morning

    I need to have Alpha rotate a photo from landscape to portrait and then save it.
    Been playing with the set_rotate() stuff as in:

    dim pic as b

    pic=file.to_blob("c:\temp\03591.jpg")
    ui_bitmap_load("rot",pic)
    ui_bitmap_draw("rot",""%code%

    set_rotate(90)

    %code%)

    dim rotated2 as b
    dim rotated3 as b
    dim fptr as p
    rotated2=ui_bitmap_save("rot")
    rotated3 = bitmap_to_jpeg(rotated2)
    fptr = file.create("c:\temp\ROT03591.jpg", FILE_RW_EXCLUSIVE)

    file.writeb(rotated3)
    fptr.close()
    ui_bitmap_drop("rot")

    This doesn't change the orientation of the photo.
    Does anyone know of a way to do this?

    Thanks
    Duane

  2. #2
    Former Alpha Employee Edward Larrabee's Avatar
    Real Name
    Edward Larrabee
    Join Date
    Nov 2002
    Location
    New Hampshire
    Posts
    1,385

    Default RE: photo rotating

    This is the way you would handle the rotation with Version 6.

    dim bb as B
    dim w as N
    dim h as N

    bb = file.to_blob("C:\input.jpg")
    ui_bitmap_load("input", bb)
    ui_bitmap_draw("input",""%code%
    w = bitmap_width("input")
    h = bitmap_height("input")
    %code%)

    ui_bitmap_create("output", h, w)
    ui_bitmap_draw("output",""%code%
    bitmap("input",0,0,h,w,"ROTATE-LEFT,HALFTONE")
    bb = ui_bitmap_save("output")
    %code%)

    file.From_blob("c:\output.jpg", bb)

  3. #3
    Member
    Real Name
    Duane Pederson
    Join Date
    Apr 2000
    Location
    Medicine Hat, AB
    Posts
    363

    Default RE: photo rotating

    Morning Ed

    Thanks for the reply

    That sounds very interesting for us that V6 will work with photos more than V5.


    Will V6 do rotating, resizing, etc to photos without changing the quality of the 24 bit image?


    I did a workaround using the focus on other program command. I had A5 send focus to Photoshop, opening a pic file, resizing, rotating,running a curve correction, and saving using the A5 send key command to run an action. Then back to A5, with the desired orientation resized picture being displayed. Seems to work so far.

    Thanks again
    Duane

  4. #4
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,714

    Default RE: photo rotating

    Duane,

    You will need to stick with the Photoshop option until v6. v5 also has trouble compressing some jpeg images to show a useful output. At the user conference Cian added some of the parameters that Ed showed you so more manipulation can be done inside a5.

    For now I am using an external freeware product, ezthumbs, to do my manipulations.

    Bill.

  5. #5
    Member
    Real Name
    Duane Pederson
    Join Date
    Apr 2000
    Location
    Medicine Hat, AB
    Posts
    363

    Default RE: photo rotating

    Hi Bill

    Thanks for the reply
    It will sure be helpful once A5 can work more with high quality images
    We are doing and depending more and more on this software every day

    Thanks
    Duane

Similar Threads

  1. showing a photo
    By Rich Rollock in forum Alpha Five Version 5
    Replies: 7
    Last Post: 04-22-2005, 07:17 AM
  2. Photo in Database
    By Keith Hubert in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-12-2005, 11:51 PM
  3. photo
    By Ken Clark in forum Alpha Five Version 5
    Replies: 11
    Last Post: 02-18-2003, 11:49 AM
  4. Rotating Text in Report
    By CharlesK in forum Alpha Five Version 4
    Replies: 4
    Last Post: 07-26-2001, 08:26 AM
  5. Member Photo
    By Scott Emerick in forum Alpha Five Version 4
    Replies: 2
    Last Post: 12-20-2000, 07:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •