OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > General

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-07-2006, 12:45
dflat
Guest
 
Posts: n/a
Default Imported TIFF outline

Hey everyone. I'm importing about 150 TIFF images of business cards to display on a map showing my university department's alumni across the US. Everything is working great so far, but I'd really like to have an outline around each tiff bitmap to help with visibility. Of course it would be a huge headache to draw boxes around each bitmap so I was hoping there is an operation where I can select all the images then simply make them have outlines. I wasn't able to find any help in the corel 'help topics' so thought it would be best to ask the experts if this operation can be done. Any suggestions would be appreciated. Thanks everyone!

Drew
Reply With Quote
  #2  
Old 10-07-2006, 20:13
sallybode
Guest
 
Posts: n/a
Default

So long as you have the same height and width, it would be a simple operation and you could record your operation doing the first one. Then just play the macro on each picture.

When pictures look better with an outline and all are the same size what I often do is to PowerClip them. In fact you could make a master template and do all the pictures in them at one time, then just cut and paste, or if you want them like that in your data base for the future, copy and paste.

It is easy to set up a template: just decide the size of your picture and then create point outline you need with a white fill. And let the transform docker copy and offset these for you.

Then you can bring the pictures in, place them, PowerClip them and you are good to go.

I have made a shortcut button for myself for PowerClipping.

What could speed things up is on the bitmap side of it, making a batch process.

You could also do the line that way in either Paint of Photoshop. In which case, you could write and action in PS or a macro/script in Paint and play it back. This is providing the pictures don't need special treatment, such as resizing or contrast adjustment, etc.
Reply With Quote
  #3  
Old 10-07-2006, 21:58
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Perfect time for a script

Sounds to me like a perfect chance to use a script. Here is some code that will draw a red rectangle with a .25 width outline around all the bitmaps on your active page. You should be able to modify this easy enough to what ever settings you like. Let me know if you have any troubles. I have only tested this under CorelDRAW X3.

Update: Made the code a little smarter, so if one of your bitmaps it rotated it should outline it correctly.

Good Scripting...

Shelby
Code:
Sub OutlineBitmaps()

Optimization = True
ActiveDocument.BeginCommandGroup "Outline Bitmaps"
On Error GoTo ErrHandler

OutlineBitmapsSub ActivePage.Shapes
    
ExitSub:
    ActiveDocument.EndCommandGroup
    Optimization = False
    ActiveWindow.Refresh
    Application.Refresh
    Exit Sub

ErrHandler:
    MsgBox "Error occured: " & Err.Description
    Resume ExitSub

End Sub

Private Sub OutlineBitmapsSub(ss As Shapes)

Dim s As Shape
Dim sRect As Shape
Dim rotation As Double
Dim x As Double, y As Double, w As Double, h As Double

rotation = 0

For Each s In ss
    If s.Type = cdrGroupShape Then
        OutlineBitmapsSub s.Shapes
    Else
        If s.Type = cdrBitmapShape Then
            If s.RotationAngle <> 0 Then
                rotation = s.RotationAngle
                s.RotationAngle = 0
            End If
          
            s.GetBoundingBox x, y, w, h
            Set sRect = ActiveLayer.CreateRectangle2(x, y, w, h)
            sRect.Outline.SetProperties 0.25, , Color:=CreateCMYKColor(0, 100, 100, 0)
            
            If rotation <> 0 Then
                s.RotationAngle = rotation
                sRect.RotationAngle = rotation
            End If
        End If
    End If
Next s

End Sub

Last edited by shelbym; 10-07-2006 at 22:20.
Reply With Quote
  #4  
Old 11-07-2006, 12:23
dflat
Guest
 
Posts: n/a
Default

Thanks everyone for your input. I would like to try running the script but have been unable to figure out how exactly to run the script you posted in corel. Does the script need to be saved in VB and then inported in corel as a corel script file? I thought there would be a simple way to run the script but I'm either overlooking something or it's a more complex process. If someone can give me a start I would really appreciate it. Thanks again!

Drew
Reply With Quote
  #5  
Old 11-07-2006, 12:29
dflat
Guest
 
Posts: n/a
Default

I'm sorry. I should have toyed around for a few more minutes before I asked for more help. I got the script up and working. Thanks so much for your help, shelbym. Everything works perfectly thanks to you!

Drew
Reply With Quote
  #6  
Old 12-07-2006, 00:20
sallybode
Guest
 
Posts: n/a
Default

The most common outline size is use is 1pt., black,
if you edit the properties as this:

sRect.Outline.SetProperties 0.01389, , Color:=CreateCMYKColor(0, 0, 0, 100)

it works and works on all bitmaps on the page.

Amazing, you are amazing Shelby! The zip file I attached has this alteration.
Attached Files
File Type: zip BitmapOutliner.zip (4.7 KB, 662 views)

Last edited by sallybode; 12-07-2006 at 00:38. Reason: Adding zip file
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get the size of an object including the outline. CORNMEN CorelDRAW/Corel DESIGNER VBA 2 03-05-2005 16:03
CD 10, VBA not returning true outline width Webster CorelDRAW/Corel DESIGNER VBA 1 24-11-2004 17:09
Apply Outline - Scale with Image geopig CorelDRAW/Corel DESIGNER VBA 4 06-05-2004 07:23
Jigsaw Creator file format Imported into Powerpoint 2002 dayuser Jigsaw Puzzle Creator 4 23-10-2003 10:40
Bounding with Outline Hernán CorelDRAW/Corel DESIGNER VBA 1 31-07-2003 13:43


All times are GMT -5. The time now is 16:30.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com