Cold Fusion Image Resize
Does someone know a function or tag in Cold Fusion to resize
images. I need to place a table of thumbnails on the web page.
After clicking on a thumbnail, the larger equivalent of the image
needs to be loaded. The problem, so far, is to dinamically scale
down images to a thumbnail size and output them.
Any help is appreciated.
YAHA1,
These links might help. Or just search the forums for
"thumbnail" or google for "ColdFusion+Image+thumbnail"
http://www.bpurcell.org/viewcontent.cfm?contentID=126
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=7&threadid=12 48691
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=3&threadid=12 50309
Similar Messages
-
we have an issue displaying content that is under a database,
with a datatype ntext. CF don't give us any error but it just don't
display the field that is in a ntext datatype.
Is there a way to get Cold Fusion to display the content that
is under that datatype?
Everything goes well with CF5 but with CF7, that problem
appear??? Help anyone???I have correct the problem by placing the ntext value last in
the select statement... that is king of weird... doesn anybody know
another way to correct that problem???
You have to put:
<cfquery datasource="dsfusion" name = "voir">
select
id,titre,chronique,images,date_parution,heure_parution,signature,domaine,chroniqueur,cour riel,grande_images,commentaire,approbation,para1,para2,para3,para4,para5,para6,para7,para8 ,para9,para10
from contenu
where id = #identification#
</cfquery>
instead of
<cfquery datasource="dsfusion" name = "voir">
select * from contenu
where id = #identification#
</cfquery> -
What's happening with cold fusion?!
first, this very page is throwing js errors in both ie8 and firefox 24.0 , i can't reply to any posts
then, with all this flurry of security breaches on gov websites running cold fusion, do we have a comprehensive white paper showing how to plug all the security holes that were uncovered?Thanks Carl,
when clicking the reply link on the forum, in ie8 i get:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/4.0; (R1 1.6); .NET CLR 2.0.50727; .NET CLR 3.0.04506.30;
.NET4.0C; .NET4.0E; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729;
InfoPath.3)
Timestamp: Mon, 18 Nov 2013 15:26:45 UTC
Message: Not implemented
Line: 1616
Char: 13546
Code: 0
URI:
http://forums.adobe.com/4.5.6/resources/scripts/gen/220b1b06a29f901e1d24252ac800883e.js
and in fireFox:
ReferenceError: $ is not defined
https://www.adobe.com/account/sign-in.adobedotcom.html?returnURL=%2Fcfusion%2Fmembership%2 Findex%2Ecfm%3Floc%3Den%5Fus%26nl%3D1%26ref%3Dlogin
Line 70
ion amariutei | [email protected] | 212-578-1011
From:
Carl Von Stetten <[email protected]>
To:
ion <[email protected]>
Date:
11/18/2013 11:19 AM
Subject:
what's happening with cold fusion?!
Re: what's happening with cold fusion?!
created by Carl Von Stetten in Advanced Techniques - View the full
discussion
Site seems to be working fine for me. As to plugging security holes,
there are two things you need to do:
1. Keep your servers updated with the latest patch(es). If you are
on CF10, use the built-in automatic updater. If on CF8 or CF9, take a
look at David Epler's Unofficial Updater project.
2. Follow the appropriate ColdFusion lockdown guide for the version
you are running.
For CF9:
http://www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/910
25512-cf9-lockdownguide-wp-ue.pdf
For CF10:
http://www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/cf1
0/cf10-lockdown-guide.pdf
-Carl V.
Please note that the Adobe Forums do not accept email attachments. If you
want to embed a screen image in your message please visit the thread in
the forum to embed the image at
http://forums.adobe.com/message/5851524#5851524
Replies to this message go to everyone subscribed to this thread, not
directly to the person who posted the message. To post a reply, either
reply to this email or visit the message page: [
http://forums.adobe.com/message/5851524#5851524]
To unsubscribe from this thread, please visit the message page at [
http://forums.adobe.com/message/5851524#5851524]. In the Actions box on
the right, click the Stop Email Notifications link.
Start a new discussion in Advanced Techniques at Adobe Community
For more information about maintaining your forum email notifications
please go to http://forums.adobe.com/thread/416458?tstart=0.
The information contained in this message may be CONFIDENTIAL and is for the intended addressee only. Any unauthorized use, dissemination of the information, or copying of this message is prohibited. If you are not the intended addressee, please notify the sender immediately and delete this message. -
I have site on a Cold Fusion MX Version: 6,1,0,hf45343_611
running on A Windows 2000 server and IIS5 using a Microsoft SQL
2000 Cluster in the backend. When ever the cluster fails over the
websites fail. I then have to restart the 3 Cold Fusion Services
and do an IIS reset. Is there a setting that I can use to avoid
having to reset the services on the webserver?Hi Upen,
Thanks for your response. It is a 64 bit machine and the setup is also 64 bit.
I would like to mention some points related to my deployment scenario:
We have a Windows server 2008 R2 Standard edition on Server machine.
I have a .net website appliaction deployed and running on this.
One of our third party vendor is developing Cold fusion application.
This Cold fusion application will be integrated in our .net website.
Deployment and configuration of Cold Fusion application and server wil be done by Third Party vendor.
I need to install Cold fusion and give access to Third party.
Issue when I install cold Fusion using default settings, my .net Website does not get loaded.
In Mozila and Chrome Browser I get blank Page with only Background image given in Body tab of page is getting displayed.
In IE Browser Page with background image given in Body tab of plus this text ' <script> src="" 'is getting displayed.
Regards,
Sarfaraj Shaikh -
How not to use Cold Fusion and Java
Overview
This write up is intended to give java developers that are
developing ColdFusion applications some beneficial information:
things that are not documented.
Scenario
The company builds enterprise class web application software
for fortune 500 companies. It had purchased a CF 7 based product,
had and existing proprietary J2EE based product, and needed to
integrate the two while meeting a host of new requirements. These
requirements were based on delivering a better user experience,
faster / cheaper integration, increased flexibility /
configuration, useablily, decreasing maintenance costs, the ability
to deploy in either install or ASP models. An initiative was
started to create a new framework that integrated the best of each
technologies. Tactically, this meant that we were to build a hybrid
CF and java application: one that used building blocks (decoupled /
cohesive components) that would allow applications to be rapidly
assembled, configured and deployed. This made sense on several
levels, the team was composed of Java and CF developers, the CF
rapid application development was very productive, there is great
functionality delivered in the CF platform and initial performance
tests showed no cause for alarm
The agreed upon design, based on requirements, and analysis
by both the CF and Java staff has us using CF in the presentation
layer, using a CF based MVC, use of CF based web services. The MVC
was deployed using CFC inheritance for model objects and views made
use of CF custom tags. The internals of the application, used a
rules engine, some proprietary java, ORM, and other J2EE
technology. The initial performance of the system was reasonable.
We pushed on with product implementation.
Then it was time to load test the application, and tune it.
Under load the response times were orders of magnitude slower,
sometimes the pages even timed out.
Armed with our profiler, oracle execution plans and we
charged ahead addressing issue after issue. Note that we took
meticulous care in tweaking the active thread pool and ensuring
that our CF setup was tuned for our application. None of the
observations here are a condemnation of the language; rather they
are aspects that, when considered together, not conducive for
building integrated java and CF frameworks that use a structured /
OO programming practices. Further detail can be provided on
request.
CFC inheritance should be avoided - resolution of variable
scope is expensive even if properly declared.
Since CF creates a class per method under the covers call
stacks become very large, especially if used in a loop. This is
nominally exacerbated by CF calls necessary to set up for the
method call (String.toUpper()).
Nesting of loops and if statements should be kept to a
minimum - the conditional for each lookup of logical operator like
LT, GT are synchronized. Under load this results in thread waits.
Jrun has as single thread pool - both http and web service
requests use the same pool. Under load this leads to thread
deadlock. There are work arounds, but they are painful.
Recursion should be avoided - we had a few recursive routines
and these had to be rewritten.
Custom Tags - should be used sparingly - each custom tag
makes a synchronized call to the license server - (This may be
fixed in CF 8)
Summary
In the end we got the performance to reasonable numbers, but
we ended up moving some code to java (Custom Tags) and getting rid
of 'good programming' practices (Inheritance, loops, etc), mandated
proper variable scoping for those things left over. We prototyped a
sans cold fusion implementation and had an order of magnitude
improvement in performance and number of requests served per
second.
The lesson? Use Coldfusion in its sweet spot: make a query,
iterate over the results and format for display. Extensive use of
structure programming techniques or OO CFCs should be avoided: they
will work but under load - but are better as a prototype. Building
frameworks in CF? Think twice, no three times, and, if you must, be
minimalist.
Textinteresting aslbert123,
Not that I doubt you, but could you answer some questions
about your implementation that was so slow:
1.) Did you put your CFCs in the application or server scope?
2.) Were you initializing your CFCs, via CreateObject or
<cfinvoke>, on every request?
3.) Are you sure that you were properly Var'ing every
variable in your methods? (people typically forget about query
names and loop iterator variables)
4.) Could you give examples of how your inheritence was set
up?
5.) For CustomTags, did you call them the old <cf_tag>
way or the newer, better-performing <cfimport> way?
6.) How did you connect CF to Java exactly?
Thanks,
Aaron -
Need to dial a phone number from Cold Fusion
My boss asked me if there was any way that a phone number
could be dialed from Cold Fusion. We have a website where at some
point we want to just click a button and dial that phone number. My
guess is that the conversation will then be carried through the
computer's microphone and speakers and using the computer's modem.
Let me know if there is a way, or what would be the easiest
way to accomplish this, even if it has to be using VOIP, since
that's an option for this project.
Thanks!Is this an internal site or an public-facing site? If you are
talking about using this tool in your intranet and you have a
modern phone system in place, there may be an API to interfacing
with your phone system. We use a TAPI interface to create a phone
dialer so our callcenter agents can dial a phone number on their
phone just by clicking on a link. I'm pretty sure there are a bunch
of freeware/shareware TAPI COM objects you can use floating around
the interwebs (If your phone system supports TAPI).
If you are talking about a public-facing website, then I'm
afraid I can't offer much advice other than to check out the Java
Communications lead that Ted gave you. -
How do you determine what version of PHP is on the cold fusion server
I am trying to find out what version of PHP is on my cold
fusion server, how do I do this? Does coldfusion come with
PHP?In the C:\Windows folder, locate the file called php.ini and
open it in Notepad.
<?php phpinfo() ?>
I answered it myself. Maybe it can help someone else. -
Ways to implement image resizing using plug-ins?
Hi Photoshop developers,
I'm a developer with a few Photoshop filter and selection plug-ins under my belt, and I have a good understanding of the SDK and tools and suites it provides. My next project is an algorithm for enlarging/resampling images to different pixel dimensions. I'm wondering if anyone has any suggestions for or experience with the best combination of plug-in types to implement this.
Clearly, I can't just write it as a filter plug-in, since there is no way to change the image dimensions from within a filter.
I'd like the resized image to remain within Photoshop (as a new window or in the original one), so an export plug-in on its own is not sufficient.
Import plug-ins seem promising, since they allow the creation of a new document of the required size. However, as best I can tell from the Photoshop 6.0 SDK documentation, import plug-ins cannot access the image data from other open documents (or even the clipboard), nor do they provide any support for channel ports and the Channel Port suite.
My best idea at this stage is to create an export plug-in to provide the user interface and calculate the resized image, and then an import plug-in to import the resized image back into a new window. (I'm supposing a further automation plug-in would then be written to perform this export/import sequence.) The difficulty I see with this approach is how to communicate the resized image data between the two plug-ins. Since the resized image will potentially be very large, the ideal solution would be to store it in channels managed by the Channel Ports suite. However, I cannot see how the channel ports created in the export plug-in could be communicated to and used by an import plug-in. The alternative would be for the export plug-in to save the resized image to a temporary file on disk, however this seems unnecessary.
So, my questions, specifically, are:
a) Is it possible to create new channels using the Channel Ports suite (sPSChannelPorts->New()) in one plug-in, and have those channels persist to be used in another plug-in?
b) If so, how would the channel ports be communicated between the plug-ins?
c) Alternately, are there any alternative architectures available for implementing an image-resizing algorithm using the plug-in types that are available for Photoshop developers.
Any responses would be greatly appreciated; I know this is a low-traffic forum...
Thanks,
Matthew.I would make an automation plug-in and a filter plug-in.<br /><br />1) Run the automation which runs your filter to gather current image <br />information<br />2) Create a temp file of the new document<br />3) Make a new document<br />4) Call the filter again to reload the temp data on disk<br /><br /><[email protected]> wrote in message <br />news:[email protected]...<br />> Hi Photoshop developers,<br />><br />> I'm a developer with a few Photoshop filter and selection plug-ins under <br />> my belt, and I have a good understanding of the SDK and tools and suites <br />> it provides. My next project is an algorithm for enlarging/resampling <br />> images to different pixel dimensions. I'm wondering if anyone has any <br />> suggestions for or experience with the best combination of plug-in types <br />> to implement this.<br />><br />> Clearly, I can't just write it as a filter plug-in, since there is no way <br />> to change the image dimensions from within a filter.<br />><br />> I'd like the resized image to remain within Photoshop (as a new window or <br />> in the original one), so an export plug-in on its own is not sufficient.<br />><br />> Import plug-ins seem promising, since they allow the creation of a new <br />> document of the required size. However, as best I can tell from the <br />> Photoshop 6.0 SDK documentation, import plug-ins cannot access the image <br />> data from other open documents (or even the clipboard), nor do they <br />> provide any support for channel ports and the Channel Port suite.<br />><br />> My best idea at this stage is to create an export plug-in to provide the <br />> user interface and calculate the resized image, and then an import plug-in <br />> to import the resized image back into a new window. (I'm supposing a <br />> further automation plug-in would then be written to perform this <br />> export/import sequence.) The difficulty I see with this approach is how to <br />> communicate the resized image data between the two plug-ins. Since the <br />> resized image will potentially be very large, the ideal solution would be <br />> to store it in channels managed by the Channel Ports suite. However, I <br />> cannot see how the channel ports created in the export plug-in could be <br />> communicated to and used by an import plug-in. The alternative would be <br />> for the export plug-in to save the resized image to a temporary file on <br />> disk, however this seems unnecessary.<br />><br />> So, my questions, specifically, are:<br />><br />> a) Is it possible to create new channels using the Channel Ports suite <br />> (sPSChannelPorts->New()) in one plug-in, and have those channels persist <br />> to be used in another plug-in?<br />><br />> b) If so, how would the channel ports be communicated between the <br />> plug-ins?<br />><br />> c) Alternately, are there any alternative architectures available for <br />> implementing an image-resizing algorithm using the plug-in types that are <br />> available for Photoshop developers.<br />><br />> Any responses would be greatly appreciated; I know this is a low-traffic <br />> forum...<br />><br />> Thanks,<br />> Matthew.
-
Images as Buttons and Image Resizing in mxml
Sorry for all the questions but I've run into a problem when trying to create buttons that are just an image in mxml. When I first tried this I couldn't find a way to get the border around the button to dissapear so it ended up looking like my image had an extra black border around it. Then someone here suggested I just set the buttonMode property of an mx:Image to true which ended up working fine to a point. The problem I'm having is that even if I make the tabEnabled property of the image (that I'm using as a button) true, I can't tab over to it. Is there a way to either get rid of the black borders of a button or to make it so I can tab over to an image I'm using as a button?
My second question has to do with image resizing. Lets say I have an image of a horizontal line that I want to put at the top of the mxml page, and I want it to extend the full length of the page, even after the user has resized the browser. Is there a way to do that? I've tried putting the width as 100% or giving the image a "left" and "right" value so that presumably it would be stretched to fit within those but nothing has worked so far. Is there no way to do this or am I doing something wrong?
Thank you for any help you guys can give.Of course, sorry about that. So the following is a barebones example of how I currently implement buttons and images as buttons:
<mx:Button id="facebookButton" icon="@Embed(source='image.png')" width="30"/>
<mx:Image buttonMode="true" id="button" source="anotherimage.png" enabled="true" click="{foo()}"/>
And within the image I've tried making the tabFocusEnabled property true but to no avail.
The following is how I've tried stretching out an image across the whole page:
<mx:Image source="yetanotherimage.png" width="100%" scaleContent="true"/>
<mx:Image source="yetanotherimage.png" left="10" right="10" scaleContent="true"/>
Is this more helpful? -
Modifying cold fusion script not picked up by iis
We are running coldfusion 7, using iis6 on windows 2003 server. I am not a cold fusion developer and this is the only coldfusion script we have created by a previous developer. I needed to make some simple modifications to the script, including a change in the title. After having restarted IIS the modified script is still not showing the new title. What do I need to do for iis to show the changes in the cfm file?
It's in the CF Administrator, which is separate from the JRun Admin Console. You can often get to the CF Administrator with a URL like this:
http://your_server/CFIDE/administrator/
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.
Read this before you post:
http://forums.adobe.com/thread/607238 -
Cold Fusion in a generic thread pool and enabling JAVA don't mix
I've got Cold Fusion MX installed on a server running Sun One 6.1. I ran into a problem trying to enable JAVA (for servlet support) which I had previous disabled because I didn't use it.
Well, when I went to enable JAVA on the server last week, the service wouldn't restart and the error logs gave me no indication of the problem.
Through a tedious trial-and-error process I've found that having Cold Fusion running under a generic thread pool while trying to have JAVA (the j2ee plugin) running under Sun One simply doesn't work (for whatever reason).
Once I killed the pool, everything runs fine.
Does anyone happen to know why this is? I keep CFMX under its own thread pool because there are certain elements to CFMX that aren't wholly stable and can result in CFMX crashing. If it crashes, the process keeps accepting requests, but never processes them. I'd like to keep the native thread pool free to keep accepting non-CFMX requests even when CFMX crashes.
Thus the separate thread pool for CFMX.
But now I can't run CFMX in a separate thread pool with JAVA enabled.
Anyone have any insights into why this is?
ThanksTwo things. Firstly, it's better to use private static final Object classLock = new Object();because that saves you worrying about whether any other code synchronises on it. Secondly, if you do decide to go for the delegation route then java.lang.reflect.Proxy may be a good way forward.
-
How to convert/download videos embedded with cold fusion?
Does anyone know of a free video conversion software that will convert and download online videos embedded with cold fusion ("cfmid=?") format/extension? I tried a few online sites and they do not support that format yet. Please help. Thank you so much!
JudyActually COLD FUSION was a hoax a few years ago. COLDFUSION is the app.
If you need content from a web site, talk to the developer.
fwiw - Since ColdFusion is an Adobe app, you should try asking your question on that forum. This one is here to primarily support Shake.
Have fun.
x -
Why won't Photoshop revert to earlier history state after image resize when scripted?
I've written an Applescript to automate watermarking and resizing images for my company. Everything generally works fine — the script saves the initial history state to a variable, resizes the image, adds the appropriate watermark, saves off a jpeg, then reverts to the initial history state for another resize and watermark loop.
The problem is when I try not to use a watermark and only resize by setting the variable `wmColor` to `"None"` or `"None for all"`. It seems that after resizing and saving off a jpeg, Photoshop doesn't like it when I try to revert to the initial history state. This is super annoying, since clearly a resize should count as a history step, and I don't want to rewrite the script to implement multiple open/close operations on the original file. Does anyone know what might be going on? This is the line that's generating the problem (it's in both the doBig and doSmall methods, and throws an error every time I ask it just to do an image resize and change current history state):
set current history state of current document to initialState
and here's the whole script:
property type_list : {"JPEG", "TIFF", "PNGf", "8BPS", "BMPf", "GIFf", "PDF ", "PICT"}
property extension_list : {"jpg", "jpeg", "tif", "tiff", "png", "psd", "bmp", "gif", "jp2", "pdf", "pict", "pct", "sgi", "tga"}
property typeIDs_list : {"public.jpeg", "public.tiff", "public.png", "com.adobe.photoshop-image", "com.microsoft.bmp", "com.compuserve.gif", "public.jpeg-2000", "com.adobe.pdf", "com.apple.pict", "com.sgi.sgi-image", "com.truevision.tga-image"}
global myFolder
global wmYN
global wmColor
global nameUse
global rootName
global nameCount
property myFolder : ""
-- This droplet processes files dropped onto the applet
on open these_items
-- FILTER THE DRAGGED-ON ITEMS BY CHECKING THEIR PROPERTIES AGAINST THE LISTS ABOVE
set wmColor to null
set nameCount to 0
set nameUse to null
if myFolder is not "" then
set myFolder to choose folder with prompt "Choose where to put your finished images" default location myFolder -- where you're going to store the jpgs
else
set myFolder to choose folder with prompt "Choose where to put your finished images" default location (path to desktop)
end if
repeat with i from 1 to the count of these_items
set totalFiles to count of these_items
set this_item to item i of these_items
set the item_info to info for this_item without size
if folder of the item_info is true then
process_folder(this_item)
else
try
set this_extension to the name extension of item_info
on error
set this_extension to ""
end try
try
set this_filetype to the file type of item_info
on error
set this_filetype to ""
end try
try
set this_typeID to the type identifier of item_info
on error
set this_typeID to ""
end try
if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
-- THE ITEM IS AN IMAGE FILE AND CAN BE PROCESSED
process_item(this_item)
end if
end if
end repeat
end open
-- this sub-routine processes folders
on process_folder(this_folder)
set these_items to list folder this_folder without invisibles
repeat with i from 1 to the count of these_items
set this_item to alias ((this_folder as Unicode text) & (item i of these_items))
set the item_info to info for this_item without size
if folder of the item_info is true then
process_folder(this_item)
else
try
set this_extension to the name extension of item_info
on error
set this_extension to ""
end try
try
set this_filetype to the file type of item_info
on error
set this_filetype to ""
end try
try
set this_typeID to the type identifier of item_info
on error
set this_typeID to ""
end try
if (folder of the item_info is false) and (alias of the item_info is false) and ((this_filetype is in the type_list) or (this_extension is in the extension_list) or (this_typeID is in typeIDs_list)) then
-- THE ITEM IS AN IMAGE FILE AND CAN BE PROCESSED
process_item(this_item)
end if
end if
end repeat
end process_folder
-- this sub-routine processes files
on process_item(this_item)
set this_image to this_item as text
tell application id "com.adobe.photoshop"
set saveUnits to ruler units of settings
set display dialogs to never
open file this_image
if wmColor is not in {"None for all", "White for all", "Black for all"} then
set wmColor to choose from list {"None", "None for all", "Black", "Black for all", "White", "White for all"} with prompt "What color should the watermark be?" default items "White for all" without multiple selections allowed and empty selection allowed
end if
if wmColor is false then
error number -128
end if
if nameUse is not "Just increment this for all" then
set nameBox to display dialog "What should I call these things?" default answer ("image") with title "Choose the name stem for your images" buttons {"Cancel", "Just increment this for all", "OK"} default button "Just increment this for all"
set nameUse to button returned of nameBox -- this will determine whether or not to increment stem names
set rootName to text returned of nameBox -- this will be the root part of all of your file names
set currentName to rootName
else
set nameCount to nameCount + 1
set currentName to rootName & (nameCount as text)
end if
set thisDocument to current document
set initialState to current history state of thisDocument
set ruler units of settings to pixel units
end tell
DoSmall(thisDocument, currentName, initialState)
DoBig(thisDocument, currentName, initialState)
tell application id "com.adobe.photoshop"
close thisDocument without saving
set ruler units of settings to saveUnits
end tell
end process_item
to DoSmall(thisDocument, currentName, initialState)
tell application id "com.adobe.photoshop"
set initWidth to width of thisDocument
if initWidth < 640 then
resize image thisDocument width 640 resample method bicubic smoother
else if initWidth > 640 then
resize image thisDocument width 640 resample method bicubic sharper
end if
set myHeight to height of thisDocument
set myWidth to width of thisDocument
if wmColor is in {"White", "White for all"} then
set wmFile to (path to resource "water_250_white.png" in bundle path to me) as text
else if wmColor is in {"Black", "Black for all"} then
set wmFile to (path to resource "water_250_black.png" in bundle path to me) as text
end if
if wmColor is not in {"None", "None for all"} then
open file wmFile
set wmDocument to current document
set wmHeight to height of wmDocument
set wmWidth to width of wmDocument
duplicate current layer of wmDocument to thisDocument
close wmDocument without saving
translate current layer of thisDocument delta x (myWidth - wmWidth - 10) delta y (myHeight - wmHeight - 10)
set opacity of current layer of thisDocument to 20
end if
set myPath to (myFolder as text) & (currentName) & "_640"
set myOptions to {class:JPEG save options, embed color profile:false, quality:12}
save thisDocument as JPEG in file myPath with options myOptions appending lowercase extension
set current history state of current document to initialState
end tell
end DoSmall
to DoBig(thisDocument, currentName, initialState)
tell application id "com.adobe.photoshop"
set initWidth to width of thisDocument
if initWidth < 1020 then
resize image thisDocument width 1020 resample method bicubic smoother
else if initWidth > 1020 then
resize image thisDocument width 1020 resample method bicubic sharper
end if
set myHeight to height of thisDocument
set myWidth to width of thisDocument
if wmColor is in {"White", "White for all"} then
set wmFile to (path to resource "water_400_white.png" in bundle path to me) as text
else if wmColor is in {"Black", "Black for all"} then
set wmFile to (path to resource "water_400_black.png" in bundle path to me) as text
end if
if wmColor is not in {"None", "None for all"} then
open file wmFile
set wmDocument to current document
set wmHeight to height of wmDocument
set wmWidth to width of wmDocument
duplicate current layer of wmDocument to thisDocument
close wmDocument without saving
translate current layer of thisDocument delta x (myWidth - wmWidth - 16) delta y (myHeight - wmHeight - 16)
set opacity of current layer of thisDocument to 20
end if
set myPath to (myFolder as text) & (currentName) & "_1020"
set myOptions to {class:JPEG save options, embed color profile:false, quality:12}
save thisDocument as JPEG in file myPath with options myOptions appending lowercase extension
set current history state of current document to initialState
end tell
end DoBigAs many others here I use JavaScript so I can’t really help you with your problem.
But I’d like to point to »the lazy person’s out« – with many operations that result in creating a new file on disk I simply duplicate the image (and flatten in the same step) to minimize any chance of damaging the original file if the Script should not perform as expected. -
I'm unable to connect to database thru cold fusion
I'm unable to connect to database thru cold fusion. it
sometiems give me an error that your uname is undefined , soemtimes
it gives ur index page not found so i created index page also but
still im unable to connect to database n update my records..plz
help me out..im a fresher in cold fusionI am having a similar problem having CFMX 7.02 verify my SQL
Server 2005 Data Sources.
I am using the sa account for CF to access the db's. But i
get the following error:
Connection verification failed for data source: myDatabase
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver]Error establishing socket.
Connection refused: connect
Every role in SQL Server has the sa grantor Grant enabled. I
can also login to SQL Server with the sa account w/o a hitch.
I don't know what else to do. The server information is set
to the ServerName port 1433, datasource name and database name are
the same as the database name in sql server, and the username and
password are set for the sa account.
Thanks! -
Image resizing in Smartforms?? or ADOBE
Hello All,
I am working on creating a smartform. It includes displaying images in the output. There could be different
smartforms displaying the same image but with different sizes.
I know of the solution to resize the image using picture editor and upload using SE78, which is then accessed in the smartform. But I want to avoid multiple sizes of same images in the MIME repository.
Is there a possibility of image resizing in the smartform ? If yes, then how ? I have tried changing the DPI in General attributes of the graphic node in smartform but it does not resize the image.
If not, then is it possible in ADOBE forms ?
Regards,
Subodh S.RaoHi Subuodh,
Please refer to the gabriels answer in the below link.
http://scn.sap.com/thread/506094
Other Ways of doing.
http://wiki.sdn.sap.com/wiki/display/ABAP/SE78+And+OAER+bmp+Image+Creating
Hope it will help.
Regards,
Amit
Maybe you are looking for
-
Problems to SEND MAIL using WWV_FLOW_MAIL.SEND - APEX_MAIL
I tried send mail using the code below DECLARE l_body CLOB:= EMPTY_CLOB; l_body_html CLOB:= EMPTY_CLOB; BEGIN wwv_flow_api.set_security_group_id; l_body :='<html> +<head>+ +<style type="text/css">+ +body{font-family: Arial, Helvetica, sans-serif
-
Error while trying to apply SP20 to Enterprise Portal 6.0
I am trying to upgrade my Enterprise Portal from SP13 to SP20, I am getting the following error message on one of the last steps. Start updating EAR file... start-up mode is lazy EAR file updated successfully for 3420ms. Start updating... EAR file up
-
The image properties (exposure, ftop, ISO)
The image properties (exposure, ftop, ISO) are not saved after I save a project and exported to JPEG. What do I need to do to change it?
-
Process for Returns the goods to vendor
Hi All Can any body please guide me in the below Returns process: 1) Goods returned from the customer and placed in to returns storage loaction, then to perform the returns process to vendor for the goods which are at returns S Loc. 2) Goods recieved
-
BAPI for CS08 - Plant assignment - BOM
Is there a BAPI for transaction CS08 (BOM - plant assignment)?