Check if uploaded image is CMYK in ActionScript 3.0
Hey guys,
Is there any way to figure this out which user uploaded image in our flex project is RGB or CMYK?
Something like using byteArray and check the specific place of CMYK/RGB header on it...
You need to test httpStatus of the URLLoader. Streaming
content undergoes a specific process when coming into Flash. The
only issue with httpStatus is that it does not work for every
browser....mostly Linux based systems and lesser programs on the
evolutionary food chain. I have not experienced problems with IE or
NS/FF on Vista at this point.
1. Send Request
2. Receive HTTP Status (HTTPStatusEvent.HTTP_STATUS)
3a. Status Good - Begin Load (Event.OPEN)
3b. Status Bad - 404 or Protected Filed
(IOErrorEvent.IO_ERROR)
4. Receive File - Downloading (ProgressEvent.PROGRESS)
5. Download Complete (Event.COMPLETE)
Similar Messages
-
Error message "This program cannot display the webpage when uploading images to Cafe Press
I have had a Café Press shop for five years and except for sometimes being slow, no problems uploading images. Now, suddenly for 3 days I get the message "This program cannot display the webpage
Most likely causes:
• You are not connected to the Internet.
• The website is encountering problems.
• There might be a typing error in the address.
What you can try:
Check your Internet connection. Try visiting another website to make sure you are connected.
Retype the address."
I got the messsage about half way through the uploading of an image. People suggested using "firefox" instead of IE so I now get a similar error message from Firefox. I signed in, clicked on the image I wanted to upload and hit "upload" and get message as follows:
Server not found
Firefox can't find the server at members.cafepress.com.
* Check the address for typing errors such as
ww.example.com instead of
[url=http://www.example.com]www.example.com[/url]
* If you are unable to load any pages, check your computer's network connection.
* If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
None of this makes sense because I WAS connected to the internet (obviously) or I wouldn't have been able to sign in, go to my media basket, browse for the image and click "upload" and watch as the progress bar showed percentage of upload such as 20%, etc. and even went to 100% at times before giving me the error message. Plus I couldn't make a typing error since I wasn't typing anything but uploading an image. Any suggestions?
Whatever your suggestion, I need step by step instructions as I am totally computer illiterate. I don't even know what a "proxy" is and don't know if I have a "firewall" as the message suggests. I have "Comodo" security and am using Windows XP.
I contacted CP which was no help at all. All they did was tell me to clear my cache which I do after every session. Thanks
Nancy
http://www.cafepress.com/calendarflrSounds like your desktop application is in fact running from
a server. CHMs were identified as a security risk by Microsoft and
are best suited to the user's PC.
Click
here for more information. -
Problem when trying to rename uploaded images using session value
Hi,
I have a form where 9 images are uploaded made into thumb nail size and then stored in a file. What I´m trying to do is rename those thumbnails from their original name to username_0, username_1, username_2 etc for each of the 9 thumbs. The username comes from the registration form on the same page. I have created a session variable for the username and am trying to use that to change to name of the image name, whilst my images are uploading and resizing the name stays as the original and not as the new username_$number. I have pasted relevant code below and would very much appreciate any help with this:
<?php session_start();
// check that form has been submitted and that name is not empty and has no errors
if ($_POST && !empty($_POST['directusername'])) {
// set session variable
$_SESSION['directusername'] = $_POST['directusername'];
// define a constant for the maximum upload size
define ('MAX_FILE_SIZE', 5120000);
if (array_key_exists('upload', $_POST)) {
// define constant for upload folder
define('UPLOAD_DIR', 'J:/xampp/htdocs/propertypages/uploads/');
// convert the maximum size to KB
$max = number_format(MAX_FILE_SIZE/1024, 1).'KB';
// create an array of permitted MIME types
$permitted = array('image/gif','image/jpeg','image/pjpeg','image/png');
foreach ($_FILES['photo']['name'] as $number => $file) {
// replace any spaces in the filename with underscores
$file = str_replace(' ', '_', $file);
// begin by assuming the file is unacceptable
$sizeOK = false;
$typeOK = false;
// check that file is within the permitted size
if ($_FILES['photo']['size'] [$number] > 0 && $_FILES['photo']['size'] [$number] <= MAX_FILE_SIZE) {
$sizeOK = true;
// check that file is of a permitted MIME type
foreach ($permitted as $type) {
if ($type == $_FILES['photo']['type'] [$number]) {
$typeOK = true;
break;
if ($sizeOK && $typeOK) {
switch($_FILES['photo']['error'] [$number]) {
case 0:
include('Includes/create_thumbs.inc.php');
break;
case 3:
$result[] = "Error uploading $file. Please try again.";
default:
$result[] = "System error uploading $file. Please contact us for further assistance.";
elseif ($_FILES['photo']['error'] [$number] == 4) {
$result[] = 'No file selected';
else {
$result[] = "$file cannot be uploaded. Maximum size: $max. Acceptable file types: gif, jpg, png.";
................CODE BELOW IS THE INCLUDES FILE THAT MAKES AND TRIES TO RENAME THE THUMBS................................................
<?php
// define constants
define('THUMBS_DIR', 'J:/xampp/htdocs/propertypages/uploads/thumbs/');
define('MAX_WIDTH_THB', 75);
define('MAX_HEIGHT_THB', 75);
set_time_limit(600);
// process the uploaded image
if (is_uploaded_file($_FILES['photo']['tmp_name'][$number] )) {
$original = $_FILES['photo']['tmp_name'][$number] ;
// begin by getting the details of the original
list($width, $height, $type) = getimagesize($original);
// check that original image is big enough
if ($width < 270 || $height < 270) {
$result[] = 'Image dimensions are too small, a minimum image of 270 by 270 is required';
else { // crop image to a square before resizing to thumb
if ($width > $height) {
$x = ceil(($width - $height) / 2);
$width = $height;
$y = 0;
else if($height > $width) {
$y = ceil(($height - $width) / 2);
$height = $width;
$x = 0;
// calculate the scaling ratio
if ($width <= MAX_WIDTH_THB && $height <= MAX_HEIGHT_THB) {
$ratio = 1;
elseif ($width > $height) {
$ratio = MAX_WIDTH_THB/$width;
else {
$ratio = MAX_HEIGHT_THB/$height;
if (isset($_SESSION['directusername'])) {
$username = $_SESSION['directusername'];
// strip the extension off the image filename
$imagetypes = array('/\.gif$/', '/\.jpg$/', '/\.jpeg$/', '/\.png$/');
$name = preg_replace($imagetypes, '', basename($_FILES['photo']['name'][$number]));
// change the images names to the user name _ the photo number
$newname = str_replace ('name', '$username_$number', $name);
// create an image resource for the original
switch($type) {
case 1:
$source = @ imagecreatefromgif($original);
if (!$source) {
$result = 'Cannot process GIF files. Please use JPEG or PNG.';
break;
case 2:
$source = imagecreatefromjpeg($original);
break;
case 3:
$source = imagecreatefrompng($original);
break;
default:
$source = NULL;
$result = 'Cannot identify file type.';
// make sure the image resource is OK
if (!$source) {
$result = 'Problem uploading image, please try again or contact us for further assistance';
else {
// calculate the dimensions of the thumbnail
$thumb_width = round($width * $ratio);
$thumb_height = round($height * $ratio);
// create an image resource for the thumbnail
$thumb = imagecreatetruecolor($thumb_width, $thumb_height);
// create the resized copy
imagecopyresampled($thumb, $source, 0, 0, $x, $y, $thumb_width, $thumb_height, $width, $height);
// save the resized copy
switch($type) {
case 1:
if (function_exists('imagegif')) {
$success[] = imagegif($thumb, THUMBS_DIR.$newname.'.gif');
$photoname = $newname.'.gif';
else {
$success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg',50);
$photoname = $newname.'.jpg';
break;
case 2:
$success[] = imagejpeg($thumb, THUMBS_DIR.$newname.'.jpg', 100);
$photoname = $newname.'.jpg';
break;
case 3:
$success[] = imagepng($thumb, THUMBS_DIR.$newname.'.png');
$photoname = $newname.'.png';
if ($success) {
$result[] = "Upload sucessful";
else {
$result[] = 'Problem uploading image, please try again or contact us for further assistance';
// remove the image resources from memory
imagedestroy($source);
imagedestroy($thumb);
?>
I hope i´ve supplied enough information and look forward to receiving any help or advise in this matter.Use double quotes here:
$newname = str_replace ('name', '$username_$number', $name);
Change it to this:
$newname = str_replace ('name', "$username_$number", $name); -
Hi,
I am getting the error while uploading images to SAP Mobile Documents from custom iOS(iPad )application using ObjectiveCMIS library.
My Custom method is as follows:
- (void)createSalesOrderRouteMapImageInFolder:(NSString*)salesOrderRouteMapFolderId routeMapImageTitle:(NSString *)imageTitle routeMapContent:(NSData *)imageData
NSInputStream *inputStream = [NSInputStream inputStreamWithData:imageData];
NSMutableDictionary *properties = [NSMutableDictionary dictionary];
[properties setObject:[NSString stringByAppendingFileExtension:imageTitle] forKey:@"cmis:name"];
[properties setObject:@"cmis:document" forKey:@"cmis:objectTypeId"];
[self.session createDocumentFromInputStream:inputStream
mimeType:@"image/png"
properties:properties
inFolder:salesOrderRouteMapFolderId
bytesExpected:[imageData length]
completionBlock:^(NSString *objectId, NSError *error) {
NSLog(@"Object id is %@",objectId);
if(error == nil) {
[inputStream close];
NSLog(@"Uploading Sales order route map successfully.");
[[NSNotificationCenter defaultCenter] postNotificationName:SaveOrderSuccessNotification object:nil];
} else {
[inputStream close];
NSLog(@"Uploading sales order route map failed.");
[[NSNotificationCenter defaultCenter] postNotificationName:SaveOrderFailedNotification object:error];
} progressBlock:^(unsigned long long bytesUploaded, unsigned long long bytesTotal) {
NSLog(@"uploading... (%llu/%llu)", bytesUploaded, bytesTotal);
OBjectiveCMIS Method in which i am getting error during upload:
- (void)sendAtomEntryXmlToLink:(NSString *)link
httpRequestMethod:(CMISHttpRequestMethod)httpRequestMethod
properties:(CMISProperties *)properties
contentInputStream:(NSInputStream *)contentInputStream
contentMimeType:(NSString *)contentMimeType
bytesExpected:(unsigned long long)bytesExpected
cmisRequest:(CMISRequest*)request
completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock
progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock
// Validate param
if (link == nil) {
CMISLogError(@"Must provide link to send atom entry");
if (completionBlock) {
completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeInvalidArgument detailedDescription:nil]);
return;
// generate start and end XML
CMISAtomEntryWriter *writer = [[CMISAtomEntryWriter alloc] init];
writer.cmisProperties = properties;
writer.mimeType = contentMimeType;
NSString *xmlStart = [writer xmlStartElement];
NSString *xmlContentStart = [writer xmlContentStartElement];
NSString *start = [NSString stringWithFormat:@"%@%@", xmlStart, xmlContentStart];
NSData *startData = [NSMutableData dataWithData:[start dataUsingEncoding:NSUTF8StringEncoding]];
NSString *xmlContentEnd = [writer xmlContentEndElement];
NSString *xmlProperties = [writer xmlPropertiesElements];
NSString *end = [NSString stringWithFormat:@"%@%@", xmlContentEnd, xmlProperties];
NSData *endData = [end dataUsingEncoding:NSUTF8StringEncoding];
// The underlying CMISHttpUploadRequest object generates the atom entry. The base64 encoded content is generated on
// the fly to support very large files.
[self.bindingSession.networkProvider invoke:[NSURL URLWithString:link]
httpMethod:httpRequestMethod
session:self.bindingSession
inputStream:contentInputStream
headers:[NSDictionary dictionaryWithObject:kCMISMediaTypeEntry forKey:@"Content-type"]
bytesExpected:bytesExpected
cmisRequest:request
startData:startData
endData:endData
useBase64Encoding:YES
completionBlock:^(CMISHttpResponse *response, NSError *error) {
if (error) {
CMISLogError(@"HTTP error when sending atom entry: %@", error.userInfo.description);
if (completionBlock) {
completionBlock(nil, error);
} else if (response.statusCode == 200 || response.statusCode == 201 || response.statusCode == 204) {
if (completionBlock) {
NSError *parseError = nil;
CMISAtomEntryParser *atomEntryParser = [[CMISAtomEntryParser alloc] initWithData:response.data];
[atomEntryParser parseAndReturnError:&parseError];
if (parseError == nil) {
completionBlock(atomEntryParser.objectData, nil);
} else {
CMISLogError(@"Error while parsing response: %@", [parseError description]);
completionBlock(nil, [CMISErrors cmisError:parseError cmisErrorCode:kCMISErrorCodeRuntime]);
} else {
CMISLogError(@"Invalid http response status code when sending atom entry: %d", (int)response.statusCode);
CMISLogError(@"Error content: %@", [[NSString alloc] initWithData:response.data encoding:NSUTF8StringEncoding]);
if (completionBlock) {
completionBlock(nil, [CMISErrors createCMISErrorWithCode:kCMISErrorCodeRuntime
detailedDescription:[NSString stringWithFormat:@"Failed to send atom entry: http status code %li", (long)response.statusCode]]);
progressBlock:progressBlock];
Attaching the logs:
ERROR [CMISAtomPubBaseService sendAtomEntryXmlToLink:httpRequestMethod:properties:contentInputStream:contentMimeType:bytesExpected:cmisRequest:completionBlock:progressBlock:] HTTP error when sending atom entry: Error Domain=org.apache.chemistry.objectivecmis Code=260 "Runtime Error" UserInfo=0x156acfa0 {NSLocalizedDescription=Runtime Error, NSLocalizedFailureReason=ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public void com.sap.mcm.server.service.AbstractChangeLogService.updateChangeLog(java.lang.String,boolean) throws com.sap.mcm.server.api.exception.MCMException method on bean instance com.sap.mcm.server.nw.service.NwChangeLogService@4e7989f3 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|NwChangeLogService in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.ejb.EJBTransactionRolledbackException: ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public com.sap.mcm.server.model.ChangeLog com.sap.mcm.server.dao.impl.ChangeLogDaoImpl.findByUserId(java.lang.String) method on bean instance com.sap.mcm.server.dao.impl.ChangeLogDaoImpl@2852b733 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|ChangeLogDaoImpl in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.persistence.NonUniqueResultException: More than 1 objects of type ChangeLog found with userId=25f8928e-8ba0-4edd-b08e-43bf6fb78f1a; nested exception is: javax.ejb.EJBException: ASJ.ejb.005044 (Failed in component: sap.com/com.sap.mcm.server.nw) Exception raised from invocation of public com.sap.mcm.server.model.ChangeLog com.sap.mcm.server.dao.impl.ChangeLogDaoImpl.findByUserId(java.lang.String) method on bean instance com.sap.mcm.server.dao.impl.ChangeLogDaoImpl@2852b733 for bean sap.com/com.sap.mcm.server.nw*annotation|com.sap.mcm.server.nw.ejb.jar*annotation|ChangeLogDaoImpl in application sap.com/com.sap.mcm.server.nw.; nested exception is: javax.persistence.NonUniqueResultException: More than 1 objects of type ChangeLog found with userId=25f8928e-8ba0-4edd-b08e-43bf6fb78f1a}
2015-03-12 04:08:31.634 Saudi Ceramics[4867:351095] Uploading sales order route map failed.Hi Sukalyan,
Have you checked the below links?
These will give you step by step implementation procedure.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a099a3bd-17ef-2b10-e6ac-9c1ea42af0e9?quicklink=index&overridelayout=true
http://wiki.sdn.sap.com/wiki/display/WDJava/KmuploadusingWebdynproapplication
Regards,
Sandip -
Hello,
I am facing a wired issue with Picture Libraries in SharePoint.
We created a custom field and added it to UserInfo list, the column based on custom field lets user upload their personal images to a Picture Library with the name <User ID>.<Image Extension> e.g. 1.jpg where UserID is internal Listitem ID of the UserInfo list and set its URL to the field value which we use to display the image on our custom user profile and some other WebParts.
If the user uploads a different image, it will overwrite the existing one it keeping the same name.
The field worked perfectly with sites using widows Based authentication, but as we move the field to sites with form based authentication we find that the field is able to upload the image properly first time but on each successive upload, although a new image gets uploaded with the name userid.imagextension and is shown in the allitems.aspx page in the thumbnail view and in the picture preview on the dispform.aspx page, but the link next to the name field and the image shown on clicking the preview points to the old image.
To put it other way
https://<Web URL>/Picture%20Library/_w/Upload_jpg.jpg
https://<Web Url>/Picture%20Library/_t/Upload_jpg.jpg
Would show the updated image
but the actual URL
https://<Web Url>/Picture%20Library/Upload.jpg
points to the old image
what’s even more strange is that even after deleting the image the url still shows the old image at
https://<Web Url>/Picture%20Library/Upload.jpg
I confirmed the same by actually repeating the same exercise on a picture Library in the User Interface
Uploading an image say upload.jpeg in the picture library using SharePoint interface.
Then uploading a different jpeg image keeping the same name upload.jpeg again in the picture library.
In allitems.aspx thumbnail view and on dispform.aspx page preview filed image now show the newly uploaded image but when you click the preview image or click the link in the name field value it takes you back to the old image.
I have seen this issue on environment where we have enabled form based authentication and the issue is not seen on another server where we have wss with windows based authentication.
Has anyone noticed such behavior and is there any workaround to that!
Thanks & Regards
Saurabh RustagiAll,
I had the same issue.
In my case, Blob Cache was enabled for the web application in which the image issue was occuring.
I cleared blob cache, and after doing a hard refresh of my browser, the correct image was then displayed.
To clear blob cache, do the following:
Navigate to:
http://yourwebapp:port/yoursite/_layouts/objectcachesettings.aspx
Select: "Object Cache Flush" and "Force all servers in the farm to flush their object cache" check boxes
Click the OK button
Hope this helps. -
Upload image with Zprogram instead se78
Dear Gurus ,
I founf in sdn a useful program that upload images instead se78.
It works fine but i cant find how to pass the Description of the image....
Can you give me a hint ?
Look the code ....
REPORT ZTEST2.
TYPE-POOLS: SBDST.
TABLES: STXBITMAPS.
CONSTANTS:
C_BDS_CLASSNAME TYPE SBDST_CLASSNAME VALUE 'DEVC_STXD_BITMAP',
C_BDS_CLASSTYPE TYPE SBDST_CLASSTYPE VALUE 'OT', " others
C_BDS_MIMETYPE TYPE BDS_MIMETP VALUE 'application/octet-stream',
C_BDS_ORIGINAL TYPE SBDST_DOC_VAR_TG VALUE 'OR'.
* Globals and globals for dynpro fields
DATA: G_OBJECTTYPE(20) TYPE C,
G_NEW_RESOLUTION LIKE STXBITMAPS-RESOLUTION,
G_STXBITMAPS TYPE STXBITMAPS,
G_STXH TYPE STXH,
G_TECHINFO TYPE RSSCG,
T_SIZE(40),
BDS_DESCRIPTION LIKE BAPISIGNAT-PROP_VALUE VALUE 'LALALA'.
CONSTANTS:
C_OBJECTTYPE_BDS LIKE G_OBJECTTYPE VALUE 'BDS',
C_OBJECTTYPE_STDTEXT LIKE G_OBJECTTYPE VALUE 'OBTEXT',
C_OBJECTTYPE_GRTEXT LIKE G_OBJECTTYPE VALUE 'OBGRAPHICS'.
DATA: P_FILENAME TYPE RLGRAP-FILENAME,
P_OBJECT TYPE STXBITMAPS-TDOBJECT,
P_ID TYPE STXBITMAPS-TDID,
P_BTYPE TYPE STXBITMAPS-TDBTYPE,
P_FORMAT TYPE C,
P_TITLE LIKE BDS_DESCRIPTION,
P_RESIDENT TYPE STXBITMAPS-RESIDENT,
P_AUTOHEIGHT TYPE STXBITMAPS-AUTOHEIGHT,
P_BMCOMP TYPE STXBITMAPS-BMCOMP.
DATA L_FILE TYPE STRING..
DATA: L_FILENAME TYPE STRING,
L_BYTECOUNT TYPE I,
L_BDS_BYTECOUNT TYPE I.
DATA: L_COLOR(1) TYPE C,
L_WIDTH_TW TYPE STXBITMAPS-WIDTHTW,
L_HEIGHT_TW TYPE STXBITMAPS-HEIGHTTW,
L_WIDTH_PIX TYPE STXBITMAPS-WIDTHPIX,
L_HEIGHT_PIX TYPE STXBITMAPS-HEIGHTPIX.
DATA: L_BDS_OBJECT TYPE REF TO CL_BDS_DOCUMENT_SET,
L_BDS_CONTENT TYPE SBDST_CONTENT,
L_BDS_COMPONENTS TYPE SBDST_COMPONENTS,
WA_BDS_COMPONENTS TYPE LINE OF SBDST_COMPONENTS,
L_BDS_SIGNATURE TYPE SBDST_SIGNATURE,
WA_BDS_SIGNATURE TYPE LINE OF SBDST_SIGNATURE,
L_BDS_PROPERTIES TYPE SBDST_PROPERTIES,
WA_BDS_PROPERTIES TYPE LINE OF SBDST_PROPERTIES.
DATA WA_STXBITMAPS TYPE STXBITMAPS.
PARAMETERS: P_FILE TYPE RLGRAP-FILENAME OBLIGATORY.
PARAMETERS: P_MATNR LIKE MARA-MATNR OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
START-OF-SELECTION.
DATA: P_NAMEX TYPE STXBITMAPS-TDNAME.
MOVE P_MATNR TO P_NAMEX.
DATA: FILELENGTH TYPE I.
DATA: BEGIN OF L_BITMAP OCCURS 0,
L(64) TYPE X,
END OF L_BITMAP.
L_FILE = P_FILE.
*SELECT SINGLE * FROM STXBITMAPS WHERE TDNAME = P_NAMEX.
* IF SY-SUBRC NE 0.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILE
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = L_BYTECOUNT
TABLES
DATA_TAB = L_BITMAP
EXCEPTIONS
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
NO_BATCH = 1
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
* call method l_bds_object->get_info
* exporting
* classname = c_bds_classname
* classtype = c_bds_classtype
* object_key = l_object_key
* changing
* signature = l_bds_signature
* exceptions
* nothing_found = 1
* others = 2.
DATA: P_DOCID TYPE STXBITMAPS-DOCID.
DATA: P_RESOLUTION LIKE STXBITMAPS-RESOLUTION.
DATA: L_OBJECT_KEY TYPE SBDST_OBJECT_KEY.
CALL FUNCTION 'SAPSCRIPT_CONVERT_BITMAP_BDS'
EXPORTING
COLOR = 'X'
FORMAT = 'BMP'
RESIDENT = P_RESIDENT
BITMAP_BYTECOUNT = L_BYTECOUNT
COMPRESS_BITMAP = 'X'
IMPORTING
WIDTH_TW = L_WIDTH_TW
HEIGHT_TW = L_HEIGHT_TW
WIDTH_PIX = L_WIDTH_PIX
HEIGHT_PIX = L_HEIGHT_PIX
DPI = P_RESOLUTION
BDS_BYTECOUNT = L_BDS_BYTECOUNT
TABLES
BITMAP_FILE = L_BITMAP
BITMAP_FILE_BDS = L_BDS_CONTENT
EXCEPTIONS
FORMAT_NOT_SUPPORTED = 1
NO_BMP_FILE = 2
BMPERR_INVALID_FORMAT = 3
BMPERR_NO_COLORTABLE = 4
BMPERR_UNSUP_COMPRESSION = 5
BMPERR_CORRUPT_RLE_DATA = 6
OTHERS = 7.
IF SY-SUBRC <> 0.
ENDIF.
CREATE OBJECT L_BDS_OBJECT.
WA_BDS_COMPONENTS-DOC_COUNT = '1'.
WA_BDS_COMPONENTS-COMP_COUNT = '1'.
WA_BDS_COMPONENTS-MIMETYPE = C_BDS_MIMETYPE."application/octet-stream
WA_BDS_COMPONENTS-COMP_SIZE = L_BDS_BYTECOUNT.
APPEND WA_BDS_COMPONENTS TO L_BDS_COMPONENTS.
WA_BDS_SIGNATURE-DOC_COUNT = '1'.
APPEND WA_BDS_SIGNATURE TO L_BDS_SIGNATURE.
L_OBJECT_KEY = P_NAMEX.
CALL METHOD L_BDS_OBJECT->CREATE_WITH_TABLE
EXPORTING
CLASSNAME = C_BDS_CLASSNAME "DEVC_STXD_BITMAP
CLASSTYPE = C_BDS_CLASSTYPE "OT
COMPONENTS = L_BDS_COMPONENTS
CONTENT = L_BDS_CONTENT
CHANGING
SIGNATURE = L_BDS_SIGNATURE
OBJECT_KEY = L_OBJECT_KEY
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC = 0.
READ TABLE L_BDS_SIGNATURE INDEX 1 INTO WA_BDS_SIGNATURE
TRANSPORTING DOC_ID.
IF SY-SUBRC = 0.
P_DOCID = WA_BDS_SIGNATURE-DOC_ID.
WA_STXBITMAPS-TDNAME = P_NAMEX.
WA_STXBITMAPS-TDOBJECT = 'GRAPHICS'.
WA_STXBITMAPS-TDID = 'BMAP'.
WA_STXBITMAPS-TDBTYPE = 'BCOL'.
WA_STXBITMAPS-DOCID = P_DOCID.
WA_STXBITMAPS-WIDTHPIX = L_WIDTH_PIX.
WA_STXBITMAPS-HEIGHTPIX = L_HEIGHT_PIX.
WA_STXBITMAPS-WIDTHTW = L_WIDTH_TW.
WA_STXBITMAPS-HEIGHTTW = L_HEIGHT_TW.
WA_STXBITMAPS-RESOLUTION = P_RESOLUTION.
WA_STXBITMAPS-RESIDENT = P_RESIDENT.
WA_STXBITMAPS-AUTOHEIGHT = P_AUTOHEIGHT.
WA_STXBITMAPS-BMCOMP = P_BMCOMP.
INSERT INTO STXBITMAPS VALUES WA_STXBITMAPS.
ENDIF.
ENDIF.
*--OAER
DATA: SIGN TYPE TABLE OF BAPISIGNAT WITH HEADER LINE,
COMP TYPE TABLE OF BAPICOMPON WITH HEADER LINE,
CONTENT TYPE TABLE OF BAPICONTEN WITH HEADER LINE,
CONTHEX TYPE TABLE OF SOLIX WITH HEADER LINE,
DOCID TYPE SOFOLENTI1-DOC_ID,
OBJKEY TYPE BAPIBDS01-OBJKEY,
DOC_DATA TYPE SOFOLENTI1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = L_FILE
FILETYPE = 'BIN'
TABLES
DATA_TAB = CONTENT.
BREAK FTELLI.
OBJKEY = P_NAMEX.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'BDS_DOCUMENTCLASS'.
SIGN-PROP_VALUE = DOC_DATA-OBJ_TYPE.
APPEND SIGN.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'BDS_CONTREP'.
SIGN-PROP_VALUE = ''.
APPEND SIGN.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'BDS_DOCUMENTTYPE'.
SIGN-PROP_VALUE = 'BDS_IMAGE'.
APPEND SIGN.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'BDS_TITLE'.
SIGN-PROP_VALUE = 'DIMITRIS'.
APPEND SIGN.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'DESCRIPTION'.
SIGN-PROP_VALUE = DOC_DATA-OBJ_DESCR.
APPEND SIGN.
SIGN-DOC_COUNT = '00000001'.
SIGN-PROP_NAME = 'LANGUAGE'.
SIGN-PROP_VALUE = SYST-LANGU.
APPEND SIGN.
COMP-DOC_COUNT = 1.
COMP-COMP_COUNT = 1.
* comp-comp_id = doc_data-obj_descr.
COMP-MIMETYPE = 'image/jpeg'.
COMP-COMP_SIZE = DOC_DATA-DOC_SIZE.
APPEND COMP.
CALL FUNCTION 'BDS_BUSINESSDOCUMENT_CREA_TAB'
EXPORTING
CLASSNAME = 'PICTURES'
CLASSTYPE = 'OT'
OBJECT_KEY = OBJKEY "p_matnr
TABLES
SIGNATURE = SIGN
COMPONENTS = COMP
CONTENT = CONTENT
EXCEPTIONS
NOTHING_FOUND = 1
PARAMETER_ERROR = 2
NOT_ALLOWED = 3
ERROR_KPRO = 4
INTERNAL_ERROR = 5
NOT_AUTHORIZED = 6
OTHERS = 7.
COMMIT WORK AND WAIT.
REFRESH: CONTENT, CONTHEX, SIGN, COMP.
Thanks a lot ....Hi,
You should be changing the URL passed to the URLRequest to
point to your server. Please check the URL from the HTML page
generated by your JSP and set the URLRequest URL accordingly.
Hope this helps. -
Ipad only uses one file name when uploading images via email
We have an image tool that uploads images to a template website. The problem is the file names for these images must be unique any duplicate file names will be rejected. Some of our users want to be able to upload from the field but Ipad only assigns the file name "photo.JPG" to jpegs. It doesn't seem to include the sequential extension that actually does exist for the image on the file name when uploading. Is there a way to get ipad to do so, or is this something that Apple maybe want to consider looking into. I can easily see the average Joe emailing themselves images and hitting save only to replace and lose an older image because let's face it, not all users are on MACs and PC's do not allow multiple files to have the same file name in the same folder.
Hi,
Based on the description, you could send email to external addresses without the Twin Oaks software. However, with the Twin Oaks software, you couldn't send successfully.
For this issue, I recommend you enable message tracking and check whether you could retrieve message tracking log entires when you send emails to external addresses through the Twin Oaks software.
If you couldn't retrieve message these tracking log entires when you send emails to external addresses through the Twin Oaks software, it means that the Exchange server is OK and the crux of the problem is the Twin Oaks software.
Here is an article about message tracking log for your reference.
Get-MessageTrackingLog
http://technet.microsoft.com/en-us/library/aa997573(v=exchg.141).aspx
Best regards,
Belinda
Belinda Ma
TechNet Community Support -
Unable to upload images in my blog
Dear moderators,
Sorry to post question in this forum.
I am facing issue while uploading images to the blog, "browse" button comes as disabled and I am not able to upload any images.
Kindly help me to resolve this issue?
Regards,
SanjanaHi Sanjana,
Check your file size and internet connections.
Regards,
Kannan -
Upload image in Dynamic Region
Hello.
Excuse me. my English is not very good.
I use Jdeveloper 11.1.1.3.0
in my application i have 2 Bounded Task Flow and i use them as a dynamic region.
in each bounded task flow i use InputFile component to upload image. but i can't upload image, because when i click the Browse button and select the image, then i click another button in my application to upload image, but the InputFile component value reset . I don't know why this happen.
this problem just happen in dynamic region, in another case I don't have any problem with upload image.
Thanks.Habib,
Welcome to OTN.
As you said you are using taskflows as region, can you check the refresh condition of the region binding in the pagedef and see if that has anything to do with this?
-Arun -
Help in upload images???
hi every body!
please help me how can I upload images in a form from client to server???
and which class use to display images to jsp pages?
I try with ImageIcon but it didn't like I wish.
thanks in advancehi every body!
please help me how can I upload images in a form from
client to server???depends, there are MANY ways to move images across the network, but i think you are talking about an HTML form submitting to your web/j2ee server, if that's the case, i'd check out MultiPartRequest from O'Reilly
and which class use to display images to jsp pages?no class, JSP renders HTML, which is just text, you use <img src="blah.jpg">
I try with ImageIcon but it didn't like I wish.ImageIcon is great, but it's for GUI programming, not web pages
thanks in advance -
Uploading images with jsp-PLEASE HELP
Hi
I would like to allow users to upload images(photos) from the website im doing.
i was gonna use perl which seems quite easy. Since everything else i used was jsp i thought i might try to do uploader in jsp (though its seems more difficult)
id like to limit :
the maximum file size to be uploaded ,
the maximum width/height of the image file
the list of the acceptable mime-types (Content-Types) -jpg, gif
Any suggestions how to go about it PLEASE- ie. what packages, classes do i need- mimeparser, BufferedImage, FileFilter? cos im bit lost which classes to use.
THANKS LOTS
sabcarinaThis is the jsp File which helps me to upload the file
But for this Jakarta Commons fileupload is needed which is normally provided with Tomcat 5.5
The code is
<%@ page contentType="text/html;charset=windows-1252"%>
<%@ page import="org.apache.commons.fileupload.DiskFileUpload"%>
<%@ page import="org.apache.commons.fileupload.FileItem"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.File"%>
<%@ page import="com.common.*"%>
<!--<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Process File Upload</title>
</head>-->
<%
DerivedLastNoEntity objLastNoEntity=new DerivedLastNoEntity();
DerivedLastNoObject objLastNo=(DerivedLastNoObject)objLastNoEntity.getData(new DerivedLastNoObject(10)).get(0);
int lastNo=objLastNo.getLastNo();
String forwardString=null;
StringBuffer parameters=new StringBuffer();
DiskFileUpload fu = new DiskFileUpload();
// If file size exceeds, a FileUploadException will be thrown
fu.setSizeMax(1000000);
List fileItems = fu.parseRequest(request);
Iterator itr = fileItems.iterator();
while(itr.hasNext()) {
FileItem fi = (FileItem)itr.next();
//Check if not form field so as to only handle the file inputs
//else condition handles the submit button input
if(!fi.isFormField()) {
String fileName=fi.getName();
if(fileName.length()>0)
fileName=(++lastNo)+fileName.substring(fileName.lastIndexOf("."));
File fNew= new File(application.getRealPath("/"), fileName);
parameters.append("&fileName=/struts-blank/"+fileName);
fi.write(fNew);
else
if(fi.getFieldName().equals("forwardString"))
forwardString=fi.getString();
else
parameters.append("&"+fi.getFieldName()+"="+fi.getString());
objLastNo.setLastNo(lastNo);
objLastNoEntity.edit(objLastNo);
System.out.println("before "+forwardString);
if(parameters.length()>0)
if(forwardString.indexOf("?")<0)
forwardString=forwardString.concat(parameters.toString().replaceFirst("&","?"));
else
forwardString=forwardString.concat(parameters.toString());
System.out.println("after "+forwardString);
response.sendRedirect(forwardString);
%>
<!--<body>
Upload Successful!!
</body>
</html>-->Bye for now
CSJakharia -
Using Adobe Drive to upload images to alfresco
Hi all,
I am using Adobe Drive 2.1 with InDesign CS4 to connect to Alfresco.When I got connected to my alfresco with Adobe Drive a new drive (z:) is created and I can see the alfresco folders there.
Imagine that I have and InDesign document opened with a local image placed in it. We want (programmatically) the image to be copied to drive "z:" when we do the check in of the InDesign document (so other people can open the InDesign document with no image link lost (everybody will have a drive z: because everybody will have Adobe Drive)), but unfortunately the image is not uploaded to alfresco until we manually do a check in from the Adobe Drive contex menu in Windows explorer, so the rest of the people have a image link lost problem.
My quetion is, Is there any way to upload the image programmatically to alfresco from InDesign? if not, Is there any other way to do this? perhaps using the Adobe Drive SDK?
Thanks in advance,
Alvaro.Currently, there is no direct method to upload images programmatically via Adobe Drive. Adobe Drive SDK is used to develop custom connector.
BTW, InDesgin has a function called package(Menu:File->Package). After you open a file with linked files and click menu File->Package, you specify a folder in Adobe Drive disk(Z:), then all related files will be saved to the specified folder and checked in automatically, no matter the original linked files are checked into the server or not. The disadvantage is that it may break your current folder structure. If the package function can meet your requirement, you can refer InDesign SDK from http://www.adobe.com/devnet/indesign/sdk.html to develop a plugin/extension to do this work. -
Does Lightroom convert images to CMYK?
I need to convert images to CMYK to submit photos for an article. I know Photoshop will convert, but don't know which software. If Lightroom does not convert to CMYK, which would I need to get?
p3vanisle wrote:
So I can locate the CMYK profile my printer is using, and install it into my design suite (PS, Illustrator, InDesign) and then export relevant filetypes in that color space? That would be terribley useful.
Yes, you have to install the profile on your computer. In Photoshop CSxx you go >Edit >Convert to Profile, and select the CMYK-profile under <Destination Space>. In Acrobat you go >Edit >Color Management, and select the profile under <Working Space>. But only Photoshop will convert the image to CMYK, whereas - at least for my understanding - Acrobat will display the image as if it were CMYK but not actually convert it.
If I do the conversion here (open their images in PS or Acrobat and convert the profile) aren't I still stuck in the 'I don't know what shade of pink you want that flower to be' still anyways?
If you get a RGB image from a client, you have to assume that the colors are as wanted. This is not different when you get a CMYK image. The problem for you is that nor everybody has a calibrated monitor, so an image might look good on their monitor but the actual color numbers will produce a print that looks different. But there is nothing you can do, except - if you have the time - adjust obvious off-colors. For instance you know the skin-color of caucasian (white) people. You know how green a lawn is, and you know that most brides wear a white gown. So if for instance the gown is blue-ish, or the skin looks overly pink, you can adjust that. More you cannot do. In case of a flower you can only accept the photo as is - unless you know this type of flower very well.
But the evaluation of color is only possible if you have a calibrated monitor that is re-calibrated regularly (every week or so). If your monitor is not calibrated you have no way of knowing if the off-color is due to the color numbers of the delivered image or a result of your un-calibrated monitor that displays the colors differently than the color numbers warrant.
If you use a calibrated monitor the colors should not change on conversion to CMYK. You can use the Softproof feature in Photoshop to check if colors are out of gamut.
- my degree is in design, yes, but we didn't cover printing and prepress specifics at all.
Yes, I have noticed in my work that the designers often have no knowledge about color management, printing, and pre-press. Good on you that you care and want to learn!
Keep on asking if you wish. -
Using curve 8520 to upload images to facebook
i am in love with the curve 8520 ease of uploading images to facebook without having to first save the images to pictures
when i receive an e-mail i can simply send the photo to facebook without having to save it to pictures and when i visit a website using the browser i can simply select full image then send simply send he image to facebook.
while researching other models with the intention to upgarde i discovered that the torch 9800 and bold 9900 do not have this feature. what is this feature called ? it is imperative that tis feature is available in the other models that i am considering upgarding to. what model has this feature?Currently, there is no direct method to upload images programmatically via Adobe Drive. Adobe Drive SDK is used to develop custom connector.
BTW, InDesgin has a function called package(Menu:File->Package). After you open a file with linked files and click menu File->Package, you specify a folder in Adobe Drive disk(Z:), then all related files will be saved to the specified folder and checked in automatically, no matter the original linked files are checked into the server or not. The disadvantage is that it may break your current folder structure. If the package function can meet your requirement, you can refer InDesign SDK from http://www.adobe.com/devnet/indesign/sdk.html to develop a plugin/extension to do this work. -
Uploading images - resolution problems
Hi all,
We have been trying to upload images - signatures into ECC from SE78 - the length and width of the image is changed - 82 mm becomes 97 mm on upload.
I believe this is due to some system setting / config around image resolution.
can anyone give me some valuable inputs on the same.
- Surya.Hi
After uploading the image,edit the technical attributes - increase the resolution and check the box - reserve height automatically.
Thanks
Vijay
PLZ reward points if helpful
Maybe you are looking for
-
Error while enabling Delta on HCM_Stageing_Area
Hi, I'm reading an Import File and trying to enable delta. Unfortunately it fails with following error messages: Error inserting entry in delta. DN: java.sql.SQLException: ORA-01400: cannot insert NULL into ("MXMC_OPER"."LOGENTRIES"."DN") And: Error
-
Error message when try to download music
When I purchase music from iTunes, I pay for the songs/albums, but get an error message that says: iTunes could not save to your Music Folder because you do not have write access. When I check the permissions on my Music Folder it says I have write a
-
Hi, if i am mapping from db2 to 11i ..i want ot understand how to work with the API(hrms) in 11i ..i have the db2 table definitions and have to map to the interface tables and API's in 11i to import the data to 11i ... thanx to you all..... venu
-
looking for Windows graphics drivers for my old laptop. the card is an ATI RADEON® XPRESS 200M IGP. Thanks.
-
went to tools, options, privacy, settings, checked all boxes to automatically clear all history when firefox closes, however at restart a web site still remains in history box. cleared cache disc cleanup etc, to no avail? thank you